From 80b311bef73ee8469055ae6f0b6083991a61b02a Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Mon, 14 Feb 2022 11:56:50 +0000 Subject: libvirt: add nova-libvirt-cleanup command Change Ia1239069ccee39416b20959cbabad962c56693cf added support for running a libvirt daemon on the host, rather than using the nova_libvirt container. It did not cover migration of existing hosts from using a container to using a host daemon. This change adds a kolla-ansible nova-libvirt-cleanup command which may be used to clean up the nova_libvirt container, volumes and related items on hosts, once it has been disabled. The playbook assumes that compute hosts have been emptied of VMs before it runs. A future extension could support migration of existing VMs, but this is currently out of scope. Change-Id: I46854ed7eaf1d5b5e3ccd8531c963427848bdc99 --- tools/kolla-ansible | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/kolla-ansible b/tools/kolla-ansible index 23c08f23b..2f80ff67a 100755 --- a/tools/kolla-ansible +++ b/tools/kolla-ansible @@ -198,6 +198,7 @@ Commands: upgrade-bifrost Upgrades an existing bifrost container genconfig Generate configuration files for enabled OpenStack services prune-images Prune orphaned Kolla images + nova-libvirt-cleanup Clean up disabled nova_libvirt containers EOF } @@ -244,6 +245,7 @@ upgrade upgrade-bifrost genconfig prune-images +nova-libvirt-cleanup EOF } @@ -547,6 +549,10 @@ EOF exit 1 fi ;; +(nova-libvirt-cleanup) + ACTION="Cleanup disabled nova_libvirt containers" + PLAYBOOK="${BASEDIR}/ansible/nova-libvirt-cleanup.yml" + ;; (bash-completion) bash_completion exit 0 -- cgit v1.2.3