[systemd-devel] systemd offline-update functionality

Uoti Urpala uoti.urpala at pp1.inet.fi
Mon Oct 15 20:18:01 UTC 2018


On Mon, 2018-10-15 at 19:07 +0000, Zhivich, Michael wrote:
> I have not observed this behavior in testing; in fact, I cannot find
> any code in systemd that removes the “/system-update” symlink if the
> update script fails.  Is this still the expected behavior or is the
> update script responsible for deleting the symlink?

"git grep /system-update" in the sources shows:
units/system-update-cleanup.service:ExecStart=/bin/rm -fv /system-update

The "Recommendations" section on the page you linked to has "Make sure
to remove the /system-update symlink as early as possible in the update
script to avoid reboot loops in case the update fails." as the second
item anyway.

 
> The same documentation page recommends setting “FailureAction =
> reboot” in case the update script fails to complete.  However, this
> does not seem to reboot the machine properly (e.g. I don’t see a POST
> screen + grub as expected).  Using “reboot-force” does seem to have
> the expected behavior.  What is the difference between these two
> methods?

They're documented on the systemd.unit manpage for example. IIRC the
"force" variant just kills processes without "properly" shutting down
services through ExecStop actions.




More information about the systemd-devel mailing list