Bug 1275409 - [RFE] cloud-init support package_reboot_if_required
[RFE] cloud-init support package_reboot_if_required
Status: NEW
Product: Fedora
Classification: Fedora
Component: cloud-init (Show other bugs)
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: Garrett Holmstrom
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2015-10-26 16:25 EDT by Aleksandar Kostadinov
Modified: 2016-07-07 08:31 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Aleksandar Kostadinov 2015-10-26 16:25:16 EDT
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.
Comment 1 Matthew Miller 2015-10-27 09:54:47 EDT
This seems important for Atomic, too, which _always_ requires a reboot.
Comment 2 Garrett Holmstrom 2016-07-06 22:42:57 EDT
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?
Comment 3 Aleksandar Kostadinov 2016-07-07 08:31:20 EDT
I would appreciate if we can force reboot when we want. And implementation of auto-guess system, not important so much.

Note You need to log in before you can comment on or make changes to this bug.