d648be03ec
Without these jobs, a compute node that is rebooted or powered off may violently kill off the VMs running inside of it. This has been kept separate from the main portion of kolla-ansible since no current role modifies the systemd jobs of the system. Change-Id: I0a4424f97b5ad872ff0398258c1dc42d31d0ef07
20 lines
574 B
Desktop File
20 lines
574 B
Desktop File
[Unit]
|
|
Description=Manage libvirt guests in kolla safely
|
|
After=docker.service
|
|
After=systemd-machined.service
|
|
After=virt-guest-shutdown.target
|
|
Requires=docker.service
|
|
Requires=virt-guest-shutdown.target
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
TimeoutStopSec=610
|
|
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
|