summaryrefslogtreecommitdiffstats
path: root/docker/services
diff options
context:
space:
mode:
authorJiri Stransky <jistr@redhat.com>2017-03-08 16:20:04 +0100
committerJiri Stransky <jistr@redhat.com>2017-03-16 13:30:20 +0100
commit555eb6d964d1d07342b1f06a8e8542860cd9beaa (patch)
tree70f64921573cc8f400ea2e7ba193cb55b7916b9c /docker/services
parent03e39d668f2b18f81dfcfc96781e753e7f9ef403 (diff)
Keep existing data for containerized Libvirt
Use mounts instead of docker volumes to preserve existing data when moving from baremetal to containerized Libvirt. Change-Id: I2215d451a4ef4023741f0750ac1b45a94652026a
Diffstat (limited to 'docker/services')
-rw-r--r--docker/services/nova-compute.yaml7
-rw-r--r--docker/services/nova-libvirt.yaml12
2 files changed, 16 insertions, 3 deletions
diff --git a/docker/services/nova-compute.yaml b/docker/services/nova-compute.yaml
index 7fc00b47..0afd3e70 100644
--- a/docker/services/nova-compute.yaml
+++ b/docker/services/nova-compute.yaml
@@ -83,6 +83,11 @@ outputs:
- /lib/modules:/lib/modules:ro
- /run:/run
- /var/lib/nova:/var/lib/nova
- - libvirtd:/var/lib/libvirt
+ - /var/lib/libvirt:/var/lib/libvirt
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create /var/lib/libvirt
+ file:
+ path: /var/lib/libvirt
+ state: directory
diff --git a/docker/services/nova-libvirt.yaml b/docker/services/nova-libvirt.yaml
index e25b2014..e8de9909 100644
--- a/docker/services/nova-libvirt.yaml
+++ b/docker/services/nova-libvirt.yaml
@@ -88,7 +88,15 @@ outputs:
- /var/lib/nova:/var/lib/nova
# Needed to use host's virtlogd
- /var/run/libvirt:/var/run/libvirt
- - libvirtd:/var/lib/libvirt
- - nova_libvirt_qemu:/etc/libvirt/qemu
+ - /var/lib/libvirt:/var/lib/libvirt
+ - /etc/libvirt/qemu:/etc/libvirt/qemu
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+ host_prep_tasks:
+ - name: create libvirt persistent data directories
+ file:
+ path: "{{ item }}"
+ state: directory
+ with_items:
+ - /etc/libvirt/qemu
+ - /var/lib/libvirt