Merge "Remove unused KeystoneRegion parameter from gnocchi-base"
[apex-tripleo-heat-templates.git] / docker / services / nova-libvirt.yaml
index d6e7dc7..480bb80 100644 (file)
@@ -14,7 +14,7 @@ parameters:
     type: string
   # we configure libvirt via the nova-compute container due to coupling
   # in the puppet modules
-  DockerNovaComputeImage:
+  DockerNovaConfigImage:
     description: image
     default: 'centos-binary-nova-compute:latest'
     type: string
@@ -48,17 +48,16 @@ outputs:
     value:
       service_name: {get_attr: [NovaLibvirtBase, role_data, service_name]}
       config_settings: {get_attr: [NovaLibvirtBase, role_data, config_settings]}
-      step_config: {get_attr: [NovaLibvirtBase, role_data, step_config]}
-      docker_image: &libvirt_image
-        list_join:
-        - '/'
-        - [ {get_param: DockerNamespace}, {get_param: DockerLibvirtImage} ]
-      puppet_tags: nova_config
-      config_volume: nova_libvirt
-      config_image:
-        list_join:
-        - '/'
-        - [ {get_param: DockerNamespace}, {get_param: DockerNovaComputeImage} ]
+      step_config: &step_config
+        get_attr: [NovaLibvirtBase, role_data, step_config]
+      puppet_config:
+        config_volume: nova_libvirt
+        puppet_tags: nova_config
+        step_config: *step_config
+        config_image:
+          list_join:
+          - '/'
+          - [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
       kolla_config:
         /var/lib/kolla/config_files/nova-libvirt.json:
            command: /usr/sbin/libvirtd --config /etc/libvirt/libvirtd.conf
@@ -70,7 +69,10 @@ outputs:
       docker_config:
         step_3:
           nova_libvirt:
-            image: *libvirt_image
+            image:
+              list_join:
+              - '/'
+              - [ {get_param: DockerNamespace}, {get_param: DockerLibvirtImage} ]
             net: host
             pid: host
             privileged: true
@@ -86,7 +88,19 @@ 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
+      upgrade_tasks:
+        - name: Stop and disable libvirtd service
+          tags: step2
+          service: name=libvirtd state=stopped enabled=no