[Openstack] Compute Node shutdown how to prevent instance suspend

Van Leeuwen, Robert rovanleeuwen at ebay.com
Fri Nov 3 00:04:56 UTC 2017


>There is this nova option:
>resume_guests_state_on_host_boot=true
>
>But it doesn't delete or shutdown instances but rather turns them on automatically once compute host resumes.
>which might also work for you, probably not just mentioning it any way.

Note that you might want to check some things after a reboot before booting up all your instances.
The easiest way would be to set this value to true but to not start the nova-compute service on boot.
Now you can check whatever you need and start nova-compute when you know the server is in a good state.
Nova will now start the instances that where running when your compute node was shutdown.
The nice thing about this is that any instances that where shutdown/suspended by users will keep in a shutdown state.
If you do not do this you would need to create a custom script that saves which instances where running before the shutdown and then use that list to start only the correct instances.

Another thing to consider is if you want to auto-start instances after a compute node did an unexpected reboot.
IMHO I would rather have a dead instance then an instance running on flaky hard/software but it might depend a bit on your use case.

>I don't know of an option to stop/delete instance on compute node shutdown.
As mentioned by some other people this is actually a libvirt setting not a nova setting.


Cheers,
Robert van Leeuwen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20171103/c9a7cdf4/attachment.html>


More information about the Openstack mailing list