aboutsummaryrefslogtreecommitdiff
path: root/tools/kolla-libvirt-guests-podman.service
diff options
context:
space:
mode:
authorMartin Hiner <m.hiner@partner.samsung.com>2022-11-21 18:38:57 +0100
committerMartin Hiner <m.hiner@partner.samsung.com>2023-04-28 16:16:55 +0200
commit53e8b80ed36a9193627862427fa224ed38375d3a (patch)
tree14463dda4a87452345c37a1a5252d50db057bc12 /tools/kolla-libvirt-guests-podman.service
parent92ddbdfbc190ec430f5527fcf867efec97e455b4 (diff)
downloadkolla-ansible-53e8b80ed36a9193627862427fa224ed38375d3a.tar.gz
kolla-ansible-53e8b80ed36a9193627862427fa224ed38375d3a.zip
Add container engine option to scripts
This patch add a way to choose container engine inside tool and test scripts. This is in preparation for Podman introduction but still leaves Docker as default container engine. Signed-off-by: Martin Hiner <m.hiner@partner.samsung.com> Change-Id: I395d2bdb0dfb4b325b6ad197c8893c8a0f768324
Diffstat (limited to 'tools/kolla-libvirt-guests-podman.service')
-rw-r--r--tools/kolla-libvirt-guests-podman.service17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/kolla-libvirt-guests-podman.service b/tools/kolla-libvirt-guests-podman.service
new file mode 100644
index 000000000..d692ab1b9
--- /dev/null
+++ b/tools/kolla-libvirt-guests-podman.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Manage libvirt guests in kolla safely
+After=systemd-machined.service
+After=virt-guest-shutdown.target
+Requires=virt-guest-shutdown.target
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+TimeoutStopSec=610
+ExecStart=-/usr/bin/podman exec nova_libvirt /bin/rm -f /var/lib/libvirt/libvirt-guests
+ExecStart=-/usr/bin/podman start nova_compute
+ExecStop=/usr/bin/podman stop nova_compute
+ExecStop=/usr/bin/podman exec nova_libvirt /bin/sh -x /usr/libexec/libvirt-guests.sh shutdown