Hi, is it possible to activate the AutomaticUpdatePolicy to apply but only reboot the system at some specific time (I am using a old laptop connected to my tv as server) ?
I currently have “stage” but when I do sudo reboot from a ssh session, it doesn’t seem to update, I need to do always the rpm-ostree update command, am I doing something wrong ? Shouldn’t the system finalize the update when rebooting ?
if i understand your question correct, you have set the AutomaticUpdatePolicy option in the /etc/rpm-ostreed.conf file to stage, but if you reboot the system no update applies?
have you checked the status of the rpm-ostreed-automatic.timer systemd unit?
This unit is disabled by default and runs rpm-ostree update one hour after reboot.
i’m not sure but i think you can setup a systemd timer that runs only on a specific time which calls a systemd unit that reboots only if an image is staged.
Yes that’s it, I have the AutomaticUpdatePolicy set to stage in the rpm-ostreed.conf.
Oh I might had the wrong idea then. I though that it rpm-ostreed-automatic.service would run rpm-ostree update (or something equivalent), and when I reboot the server, I would have the latest updated version always.
The way you said make it seems I need to be rebooting occasionally to trigger the rpm-ostreed.service, is that it ?
Might be easier then to simply have systemd timer to run rpm-ostree update every day at X hours right ?
The status commands only shows that it run once, so once every reboot then ?
$ systemctl status rpm-ostreed-automatic.service
○ rpm-ostreed-automatic.service - rpm-ostree Automatic Update
Loaded: loaded (/usr/lib/systemd/system/rpm-ostreed-automatic.service; static)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf
Active: inactive (dead) since Sat 2024-11-02 17:23:17 WET; 5h 20min ago
Duration: 41.923s
Invocation: 5f7f0c0fd6de4810ba7ffebca9fc2457
TriggeredBy: ● rpm-ostreed-automatic.timer
Docs: man:rpm-ostree(1)
man:rpm-ostreed.conf(5)
Process: 26061 ExecStart=rpm-ostree upgrade --quiet --trigger-automatic-update-policy (code=exited, status=0/SUCCESS)
Main PID: 26061 (code=exited, status=0/SUCCESS)
Mem peak: 49.5M
CPU: 110ms
Nov 02 17:22:35 homelab systemd[1]: Started rpm-ostreed-automatic.service - rpm-ostree Automatic Update.
Nov 02 17:23:17 homelab systemd[1]: rpm-ostreed-automatic.service: Deactivated successfully.
The systemd unit rpm-ostreed-automatic.timer i mentioned in the previous post calls the systemd service where you posted the status from if the unit is enabled. The default is one hour after boot and after a day of inactivity. You can see this by running systemctl cat rpm-ostreed-automatic.timer.
When this unit is enabled, it should check for updates and stage these if available, but for the reboot you need to write your own timer and service unit afaik
I can do the reboot manually once a week. Thanks. Just to be sure if I do systemctl reboot from an ssh session it will reboot into the latest staged version correct ?