Merge "Make EnablePackageInstall and Debug descriptions consistent"
[apex-tripleo-heat-templates.git] / docker / services / neutron-dhcp.yaml
index 99ccba3..eed8a1c 100644 (file)
@@ -4,17 +4,11 @@ description: >
   OpenStack containerized Neutron DHCP service
 
 parameters:
-  DockerNamespace:
-    description: namespace
-    default: 'tripleoupstream'
-    type: string
   DockerNeutronDHCPImage:
     description: image
-    default: 'centos-binary-neutron-dhcp-agent:latest'
     type: string
   DockerNeutronConfigImage:
     description: The container image to use for the neutron config_volume
-    default: 'centos-binary-neutron-server:latest'
     type: string
   EndpointMap:
     default: {}
@@ -74,10 +68,7 @@ outputs:
         config_volume: neutron
         puppet_tags: neutron_config,neutron_dhcp_agent_config
         step_config: *step_config
-        config_image:
-          list_join:
-            - '/'
-            - [ {get_param: DockerNamespace}, {get_param: DockerNeutronConfigImage} ]
+        config_image: {get_param: DockerNeutronConfigImage}
       kolla_config:
         /var/lib/kolla/config_files/neutron_dhcp.json:
           command: /usr/bin/neutron-dhcp-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/dhcp_agent.ini --log-file /var/log/neutron/dhcp-agent.log --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-dhcp-agent
@@ -93,10 +84,7 @@ outputs:
       docker_config:
         step_4:
           neutron_dhcp:
-            image:
-              list_join:
-                - '/'
-                - [ {get_param: DockerNamespace}, {get_param: DockerNeutronDHCPImage} ]
+            image: {get_param: DockerNeutronDHCPImage}
             net: host
             pid: host
             privileged: true
@@ -118,6 +106,16 @@ outputs:
             path: /var/log/containers/neutron
             state: directory
       upgrade_tasks:
+        - name: Check if neutron_dhcp_agent is deployed
+          command: systemctl is-enabled neutron-dhcp-agent
+          tags: common
+          ignore_errors: True
+          register: neutron_dhcp_agent_enabled
+        - name: "PreUpgrade step0,validation: Check service neutron-dhcp-agent is running"
+          shell: /usr/bin/systemctl show 'neutron-dhcp-agent' --property ActiveState | grep '\bactive\b'
+          when: neutron_dhcp_agent_enabled.rc == 0
+          tags: step0,validation
         - name: Stop and disable neutron_dhcp service
           tags: step2
+          when: neutron_dhcp_agent_enabled.rc == 0
           service: name=neutron-dhcp-agent state=stopped enabled=no