Hello Tzach,

Agree for a graceful shutdown there should be some steps ahead. Im actually asking the question because the hardware we use has a high failure rate on RAID controllers. The physical machine reacts with a reboot, so its not controlable from our side. We dont want to delete the instances at all, its just about the Instance shutdown/process kill.

Got a good answer already:
If you are using CentOS  / Red Hat you can modify this file:
/etc/sysconfig/libvirt-guests
libvirt-guests:#ON_SHUTDOWN=suspend


Thanks for your answer!

Cheers Chris


On 2017-11-02 15:54, Tzach Shefi wrote:
Hi, 

A better Q would be why do you shutdown a compute node to begin with?
I mean if you need you should do so in an orderly fashion basically
excavate instances

or shut instances down manually, put the compute node in maintenance
mode. 
On rebooting compute node remove it from maintenance mode, turn on
instances or migrate them back to this compute node should you need. 
Od delete them if you wish. 

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.  

I don't know of an option to stop/delete instance on compute node
shutdown. 

Another option check maybe you could shelve suspended instance and
then later delete them. 

Shelving stops the instance and takes a snapshot of it. Then depending
on the value of the shelved_offload_time config option, the instance
is deleted from the hypervisor (0), never deleted (-1), or deleted
after some period of time (> 0). Note that it's just destroying the
backing instance on the hypervisor, the actual instance in the nova
database is not deleted. Then you can later unshelve the instance:

This might help, but do not if you mess with kvm without updating Nova
you might be left haning else where :)
https://ask.fedoraproject.org/en/question/8796/make-libvirt-to-shutdown-my-guests-not-suspend/
[2]

 

On Thu, Nov 2, 2017 at 9:03 AM, Chris <cont...@progbau.de> wrote:

Hello,

When we shut down a compute node the instances running on it get
suspended. This generates some difficulties with some applications
like RabbitMQ dont like to be suspended. Is there a way to change
this behavior so that the running instances gets killed or shutdown
instead?

Thanks in advance.

Cheers,
Chris

_______________________________________________
Mailing list:
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack [1]
Post to     : openstack@lists.openstack.org
Unsubscribe :
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack [1]

--

Tzach Shefi

Senior Quality Engineer, RHCSA

Red Hat

 tsh...@redaht.com    M: +972-54-4701080 [3]     IM: tshefi

                 [4]



Links:
------
[1] http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
[2]
https://ask.fedoraproject.org/en/question/8796/make-libvirt-to-shutdown-my-guests-not-suspend/
[3] tel:+972-54-4701080
[4] https://red.ht/sig

_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Reply via email to