diff options
| author | Mark Goddard <mark@stackhpc.com> | 2022-02-14 11:56:50 +0000 |
|---|---|---|
| committer | Mark Goddard <mark@stackhpc.com> | 2022-03-21 11:54:54 +0000 |
| commit | 80b311bef73ee8469055ae6f0b6083991a61b02a (patch) | |
| tree | 110b17709b0e7482a437328f190dbd8cb7ebf905 /ansible/nova-libvirt-cleanup.yml | |
| parent | 4e41acd8f0ccc8dee432f72cfafcca16d01a11b7 (diff) | |
| download | kolla-ansible-80b311bef73ee8469055ae6f0b6083991a61b02a.tar.gz kolla-ansible-80b311bef73ee8469055ae6f0b6083991a61b02a.zip | |
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
Diffstat (limited to 'ansible/nova-libvirt-cleanup.yml')
| -rw-r--r-- | ansible/nova-libvirt-cleanup.yml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ansible/nova-libvirt-cleanup.yml b/ansible/nova-libvirt-cleanup.yml new file mode 100644 index 000000000..5124b37d4 --- /dev/null +++ b/ansible/nova-libvirt-cleanup.yml @@ -0,0 +1,14 @@ +--- +- import_playbook: gather-facts.yml + +- name: Remove nova_libvirt container + gather_facts: false + hosts: + - compute + serial: '{{ kolla_serial|default("0") }}' + tags: + - nova-libvirt-cleanup + tasks: + - import_role: + name: nova-cell + tasks_from: libvirt-cleanup.yml |
