On Thu, 8 Jul 2021 at 21:47, J-P Methot <jp.methot@planethoster.info> wrote:

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.

The /usr/libexec/libvirt-guests.sh script is available on CentOS images, at least those that I checked: train (centos7) and ussuri (centos8). However, in Ubuntu the script lives at /usr/lib/libvirt/libvirt-guests.sh in both bionic [1] and focal [2]. It is possible that this has simply never been tested on Ubuntu.

[1] https://packages.ubuntu.com/bionic/amd64/libvirt-daemon/filelist
[2] https://packages.ubuntu.com/focal/amd64/libvirt-daemon/filelist