On 2014-03-28 22:16, Joshua Harlow wrote:
I think u want the power_state_change one.
http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/config/cc_power_state_change.py
[2]
Then put in something like.
power_state: reboot
Let me know if the above works.
Interesting thought. Got the below working instead
though, so haven't tried this.
Although your 'package_reboot_if_required' should have worked, maybe
a
bug?
http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/config/cc_package_update_upgrade_install.py#L36
Yep, looks like a bug. Line 25 there says:
REBOOT_FILE = "/var/run/reboot-required"
Looking at a VM here which just installed a new kernel,
there's no /var/run/reboot-required file. Further
Googling around pretty strongly indicates it's a
Debian/Ubuntu thing only.
The easy workaround (tested, and working) was to
inject an extra file to /var/run/reboot-required.
After the package updating completed, *bang* reboot.
With that, I think this bit of stuff is working
well enough to build the rest of our regression
testing framework on top of now.
Time to find out... ! :)
+ Justin
--
Mailing list: https://launchpad.net/~cloud-init
Post to : [email protected]
Unsubscribe : https://launchpad.net/~cloud-init
More help : https://help.launchpad.net/ListHelp