From b98bc3a458a0382cdd32d219a946a08ca2da023f Mon Sep 17 00:00:00 2001
From: SamYaple <sam@yaple.net>
Date: Tue, 15 Mar 2016 19:37:17 +0000
Subject: [PATCH] Change libvirt volume name to libvirtd

This change is a "futureproofing" thing. It has already been discussed
that libvirt should not be a child of nova and should be removed out
to the base docker directory (just like openvswitch isn't a child of
neutron). That is not going to happen this cycle but when it does we
can't change the name of the volume. This updates the volumes to the
proper name of libvirtd. This is in contrast with the libvirtlogd
volume that will be needed in newton due to libvirt 1.3

Of note, the container can remain named nova_libvirt since we can
change that on the fly later without breaking instances.

This wont break liberty as named_volumes are not backported yet.

TrivialFix

Change-Id: I16cf9e1b1dbba9b5a9f5cc883494580e276d4f72
---
 ansible/roles/nova/tasks/start_compute.yml | 4 ++--
 tools/cleanup-containers                   | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/ansible/roles/nova/tasks/start_compute.yml b/ansible/roles/nova/tasks/start_compute.yml
index f3dce9008f..f88e3aa917 100644
--- a/ansible/roles/nova/tasks/start_compute.yml
+++ b/ansible/roles/nova/tasks/start_compute.yml
@@ -12,8 +12,8 @@
       - "/lib/modules:/lib/modules:ro"
       - "/run/:/run/"
       - "/sys/fs/cgroup:/sys/fs/cgroup"
+      - "libvirtd:/var/lib/libvirt"
       - "nova_compute:/var/lib/nova/"
-      - "nova_libvirt:/var/lib/libvirt"
   when: inventory_hostname in groups['compute']
 
 - name: Starting nova-compute container
@@ -28,8 +28,8 @@
       - "/lib/modules:/lib/modules:ro"
       - "/run:/run"
       - "kolla_logs:/var/log/kolla/"
+      - "libvirtd:/var/lib/libvirt"
       - "nova_compute:/var/lib/nova/"
-      - "nova_libvirt:/var/lib/libvirt"
   when:
     - inventory_hostname in groups['compute']
     - not enable_nova_fake | bool
diff --git a/tools/cleanup-containers b/tools/cleanup-containers
index da716b0607..31a59275f5 100755
--- a/tools/cleanup-containers
+++ b/tools/cleanup-containers
@@ -50,10 +50,11 @@ else
         heka{,_socket} \
         ironic_pxe \
         kolla_logs \
+        libvirtd \
         mariadb \
         mongodb \
         neutron_metadata_socket \
-        nova_{compute,libvirt} \
+        nova_compute \
         openvswitch_db \
         rabbitmq
     )