Maintenance_windows | Checks and reboots

Hallo :waving_hand: !

I am trying to set up a maintenance_window so that updates can be applied (reboot) over the night. The thing that I ran accross (i do not no if this is by design or no) is that IncusOS will no longer check for updates outside of that maintenance window.
If my understanding is correct, that means that both the update check and the apply should occurs during that configured maintenance window.

I configured it the following way but I just want to make sure this is the appropriate way…

config:
  auto_reboot: true
  channel: stable
  check_frequency: 1h
  maintenance_windows:
    - start_hour: 6
      start_minute: 0
      end_hour: 10
      end_minute: 0

Changed auto_reboot to true and check_frequency to 1h to fit that maintenance window.
System timezone is UTC

Cheers

Yeah, that’s the expected behavior.

IncusOS doesn’t have separate download and apply stages, so the updates are both pulled and applied during the window.

It’s something that could in theory be changed now that we support having multiple images for applications too, effectively allowing for the OS image to be downloaded and setup for next boot and then application images to be downloaded and not switched to, but that’s adding even more logic to a reasonably complex part of the codebase.

Understood.
Just want to make sure, with the above configuration (specifically the 1h check frequency), I should not miss an update right ?

I know we used to have some logic issues around that, but I “think” it should be fine now?

@gibmat

I think the maintenance window logic should be behaving as expected; the config posted above should give the desired result of automatically applying updates only during the overnight window.

We do have an open issue to utilize a common scheduling package (Use new scheduling logic for update checks · Issue #767 · lxc/incus-os · GitHub) which would allow us to eliminate a lot of custom code for determining if/when to check for updates. :slightly_smiling_face:

1 Like