Hi guys, I wanna understanding better how my Silverblue works.
When I update my system, are all the “tasks related to the deployment” made when rpm-ostree upgrade finishes? Or are there any kind of related tasks that are invoked only at the reboot/shutdown process?
I ask this to know if abrupt freezes of the system between a finished rpm-ostree upgrade and the reboot may have any kind of impact over the upgrade process.
All the task except /etc merge and bootloader swap is finished during rpm-ostree update execution. An /etc merge is performed while system shutdown. The /etc directory is writable in Silverblue and it is handled in another way than other directories. While rpm-ostree creates new deployment, it nerges your changes in /etc with version that comes with the new deployment. If you execute rpm-ostree update and do not shutdown system properly, it will boot to an old deployment because the new deplpyment will not be ready to boot. But it will still be staged, so system will try to do /etc merge during next shutdown
Thanks for the explanation. You give me a lot of information.
I made tests in a virtual machine … and the only correction that I could make is that if a deployment fails because the system froze … it just keeps the previous situation and don’t try to finish the deployment in the future.
Here are all that I could understand:
Behavior:
All the tasks except /etc merge and bootloader swap are finished during rpm-ostree upgrade execution. An /etc merge is performed while system shutdown.
The /etc directory is writable in Silverblue and it is handled in another way than other directories. While rpm-ostree creates a new deployment, it merges your changes in /etc with the version that comes with the new deployment.
If we do an upgrade but the machine didn’t shutdown correctly (e.g. freezes), when we restart the machine, we will have the previous situation (before the unsuccessful deployment). The machine state will be like if we never had invoked the rpm-ostree command that tried the unsuccessful deployment.
rpm-ostree uses staged deployment, the deployment is finalized at shutdown by ostree-finalize-staged.service systemd service unit.
Obs: ostree admin upgrade doesn’t use staged deployment. The deployment is totally applied when we invoke the ostree admin upgrade and unclean shutdowns (like machine freeze) don’t affect the process.
Info about ostree-finalize-staged.service systemd service unit:
We don’t have a manual for ostree-finalize-staged.service systemd service unit or ostree admin finalize-staged command. The unit is just mentioned at man rpm-ostreed.conf.
$ systemctl cat ostree-finalize-staged.service
Command invoked by the service: ostree admin finalize-staged