[kolla] Clean shutdown for guest VMs when host shutdown

J-P Methot jp.methot at planethoster.info
Thu Jul 8 19:46:05 UTC 2021


On 7/8/21 2:31 PM, Sean Mooney wrote:
> the script and systemd service file need to be installed on the host outside the containers really for it to work
> so i would not expect it to be in the contianer it self.

The systemd script does call another script in the container. Here, lets 
look at this snippet from the systemd script at 
https://github.com/openstack/kolla-ansible/blob/master/tools/kolla-libvirt-guests.service 
:

ExecStart=-/usr/bin/docker exec nova_libvirt /bin/rm -f 
/var/lib/libvirt/libvirt-guests
ExecStart=-/usr/bin/docker start nova_compute
ExecStop=/usr/bin/docker stop nova_compute

ExecStop=/usr/bin/docker exec nova_libvirt /bin/sh -x 
/usr/libexec/libvirt-guests.sh shutdown

It looks like it removes the libvirt-guests regular script if it's 
present when it starts and starts a different script with the shutdown 
argument when it stops. This second script is the one missing from my 
installed container image, hence why I am confused.

-- 
Jean-Philippe Méthot
Senior Openstack system administrator
Administrateur système Openstack sénior
PlanetHoster inc.




More information about the openstack-discuss mailing list