Description of problem: Cloud-init in deb based distributions have the option `package_reboot_if_required` that would reboot machine if packages were updated mandating a reboot. But this option does not work on RPM based distros. Even if we have an option to always reboot after upgrade, that would greatly help. Without such option, machine may end up in inconsistent state after a big RPM update. It's hard to implement with script.
This seems important for Atomic, too, which _always_ requires a reboot.
Debian packages indicate that a reboot is necessary by creating /var/run/reboot-required. If cloud-init detects that file after it finishes installing packages it immediately reboots the system. Fedora doesn't have that file, but one route we could take is to instead run the ``tracer'' command and see if it complains about anything that needs to be restarted. Some quick testing suggests that its exit code reflects whether a reboot is necessary or not, but I am somewhat hesitant to go that route, lest crashes cause boot loops. That does bring in a couple more dependencies, but they're relatively lightweight. Thoughts?
I would appreciate if we can force reboot when we want. And implementation of auto-guess system, not important so much.
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.
Opened an RFE upstream to see if tracer can write the /var/run/reboot-required file: https://github.com/FrostyX/tracer/issues/195
Kudos to the tracer team as they made a PR to get this working in tracer! 🎉 https://github.com/FrostyX/tracer/issues/195#event-9279013791
PR made to kickstart: https://pagure.io/fedora-kickstarts/pull-request/968
This is currently in F39/F40 and it works! 🎉