cicerops / autopilot

Just some humble programs to assist in systems maintenance
GNU Affero General Public License v3.0
0 stars 0 forks source link

Unattended upgrades: Configure different reboot time for hypervisors vs. guests #4

Open amotl opened 2 years ago

amotl commented 2 years ago

Currently, the reboot time is configured to be 4 o'clock in the morning for all hosts.

https://github.com/cicerops/autopilot/blob/9a80360646055f0a805ac4b9f3bba6698bb34658/debian-enable-unattended-upgrades.sh#L15-L16

https://github.com/cicerops/autopilot/blob/9a80360646055f0a805ac4b9f3bba6698bb34658/debian-enable-unattended-upgrades.sh#L177-L178

It would be better to determine if the program is running on a hypervisor host vs. a guest machine and configure the reboot time differently. For example, I can imagine configuring the reboot time to 5 o'clock for hypervisor hosts instead.

Tonkenfo commented 2 years ago

Wouldn't it be better to reboot the hypervisor first. Then possible mandatory reboots from vm's are already done. Sure there are some Machines that only get paused while the hypervisor reboots but on some hypervisors they get restarted.