Adds a pre-upgrade check that service is running (step0)
authormarios <marios@redhat.com>
Fri, 23 Dec 2016 14:07:44 +0000 (16:07 +0200)
committermarios <marios@redhat.com>
Fri, 27 Jan 2017 09:20:15 +0000 (11:20 +0200)
Adds a step0 for most services to check that the state is running
before continuing with any of the other upgrades steps (these are
tagged step0).

You can skip this service check by overriding the
SkipUpgradeConfigTags parameter as follows:

parameter_defaults:
  SkipUpgradeConfigTags: validation

Co-Authored-By: Steven Hardy <shardy@redhat.com>
Change-Id: Ie276f153015f671b720b6ed5beaac1b921661909

30 files changed:
puppet/services/aodh-api.yaml
puppet/services/aodh-evaluator.yaml
puppet/services/aodh-listener.yaml
puppet/services/aodh-notifier.yaml
puppet/services/apache-internal-tls-certmonger.yaml
puppet/services/apache.yaml
puppet/services/barbican-api.yaml
puppet/services/ceilometer-agent-central.yaml
puppet/services/ceilometer-agent-compute.yaml
puppet/services/ceilometer-agent-notification.yaml
puppet/services/ceilometer-api.yaml
puppet/services/ceilometer-collector.yaml
puppet/services/ceilometer-expirer.yaml
puppet/services/cinder-api.yaml
puppet/services/cinder-scheduler.yaml
puppet/services/cinder-volume.yaml
puppet/services/glance-api.yaml
puppet/services/gnocchi-api.yaml
puppet/services/gnocchi-metricd.yaml
puppet/services/gnocchi-statsd.yaml
puppet/services/haproxy.yaml
puppet/services/heat-api-cfn.yaml
puppet/services/heat-api-cloudwatch.yaml
puppet/services/heat-api.yaml
puppet/services/heat-engine.yaml
puppet/services/neutron-api.yaml
puppet/services/neutron-dhcp.yaml
puppet/services/neutron-l3.yaml
puppet/services/neutron-metadata.yaml
puppet/services/neutron-ovs-agent.yaml

index 62c4b09..2401d76 100644 (file)
@@ -86,6 +86,9 @@ outputs:
       metadata_settings:
         get_attr: [ApacheServiceBase, role_data, metadata_settings]
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-aodh-api is running"
+          shell: /usr/bin/systemctl show 'openstack-aodh-api' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop aodh_api service (running under httpd)
           tags: step2
           service: name=httpd state=stopped
index bd87bf8..56dbb55 100644 (file)
@@ -41,6 +41,9 @@ outputs:
       step_config: |
         include tripleo::profile::base::aodh::evaluator
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-aodh-evaluator is running"
+          shell: /usr/bin/systemctl show 'openstack-aodh-evaluator' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop aodh_evaluator service
           tags: step2
           service: name=openstack-aodh-evaluator state=stopped
index 606131e..76db0ca 100644 (file)
@@ -41,6 +41,9 @@ outputs:
       step_config: |
         include tripleo::profile::base::aodh::listener
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-aodh-listener is running"
+          shell: /usr/bin/systemctl show 'openstack-aodh-listener' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop aodh_listener service
           tags: step2
           service: name=openstack-aodh-listener state=stopped
index 666e641..30c6763 100644 (file)
@@ -41,6 +41,9 @@ outputs:
       step_config: |
         include tripleo::profile::base::aodh::notifier
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-aodh-notifier is running"
+          shell: /usr/bin/systemctl show 'openstack-aodh-notifier' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop aodh_notifier service
           tags: step2
           service: name=openstack-aodh-notifier state=stopped
index 97d6ff8..4c21e02 100644 (file)
@@ -63,3 +63,7 @@ outputs:
               type: node
           for_each:
             $NETWORK: {get_attr: [ApacheNetworks, value]}
+      upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service httpd is running"
+          shell: /usr/bin/systemctl show 'httpd' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
index 82e0c5f..74ddbde 100644 (file)
@@ -66,3 +66,7 @@ outputs:
               - "%{hiera('apache_remote_proxy_ips_network')}"
       metadata_settings:
         get_attr: [ApacheTLS, role_data, metadata_settings]
+      upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service httpd is running"
+          shell: /usr/bin/systemctl show 'httpd' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
index 4e42075..186af1c 100644 (file)
@@ -146,3 +146,7 @@ outputs:
             get_param: [EndpointMap, KeystoneV3Internal, uri_no_suffix]
       metadata_settings:
         get_attr: [ApacheServiceBase, role_data, metadata_settings]
+      upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-barbican-api is running"
+          shell: /usr/bin/systemctl show 'openstack-barbican-api' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
index 99982db..cf8a8a8 100644 (file)
@@ -55,6 +55,9 @@ outputs:
       step_config: |
         include ::tripleo::profile::base::ceilometer::agent::central
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-central is running"
+          shell: /usr/bin/systemctl show 'openstack-ceilometer-central' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop ceilometer_agent_central service
           tags: step2
           service: name=openstack-ceilometer-central state=stopped
index d2d299b..0004291 100644 (file)
@@ -49,6 +49,9 @@ outputs:
       step_config: |
         include ::tripleo::profile::base::ceilometer::agent::compute
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-compute is running"
+          shell: /usr/bin/systemctl show 'openstack-ceilometer-compute' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop ceilometer_agent_compute service
           tags: step2
           service: name=openstack-ceilometer-compute state=stopped
index 4cd7c43..760acd6 100644 (file)
@@ -50,6 +50,9 @@ outputs:
       step_config: |
         include ::tripleo::profile::base::ceilometer::agent::notification
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-notification is running"
+          shell: /usr/bin/systemctl show 'openstack-ceilometer-notification' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop ceilometer_agent_notification service
           tags: step2
           service: name=openstack-ceilometer-notification state=stopped
index cd0c46e..cc0d158 100644 (file)
@@ -93,6 +93,9 @@ outputs:
       metadata_settings:
         get_attr: [ApacheServiceBase, role_data, metadata_settings]
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-api is running"
+          shell: /usr/bin/systemctl show 'openstack-ceilometer-api' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop ceilometer_api service (running under httpd)
           tags: step2
           service: name=httpd state=stopped
index 5250c2c..a219f9e 100644 (file)
@@ -60,6 +60,9 @@ outputs:
       step_config: |
         include ::tripleo::profile::base::ceilometer::collector
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-collector is running"
+          shell: /usr/bin/systemctl show 'openstack-ceilometer-collector' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop ceilometer_collector service
           tags: step2
           service: name=openstack-ceilometer-collector state=stopped
index 714434b..5341cfe 100644 (file)
@@ -40,3 +40,7 @@ outputs:
         get_attr: [CeilometerServiceBase, role_data, config_settings]
       step_config: |
         include ::tripleo::profile::base::ceilometer::expirer
+      upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-ceilometer-expirer is running"
+          shell: /usr/bin/systemctl show 'openstack-ceilometer-expirer' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
index e3c9632..bc5f080 100644 (file)
@@ -149,7 +149,7 @@ outputs:
       metadata_settings:
         get_attr: [ApacheServiceBase, role_data, metadata_settings]
       upgrade_tasks:
-        - name: "PreUpgrade step0: Check service openstack-cinder-api is running"
+        - name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running"
           shell: /usr/bin/systemctl show 'openstack-cinder-api' --property ActiveState | grep '\bactive\b'
           tags: step0,validation
         - name: check for cinder running under apache (post upgrade)
index 6a0b1f2..f102810 100644 (file)
@@ -52,6 +52,9 @@ outputs:
       step_config: |
         include ::tripleo::profile::base::cinder::scheduler
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-cinder-scheduler is running"
+          shell: /usr/bin/systemctl show 'openstack-cinder-scheduler' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop cinder_scheduler service
           tags: step2
           service: name=openstack-cinder-scheduler state=stopped
index 8834eaa..dd1d383 100644 (file)
@@ -116,6 +116,9 @@ outputs:
       step_config: |
         include ::tripleo::profile::base::cinder::volume
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-cinder-volume is running"
+          shell: /usr/bin/systemctl show 'openstack-cinder-volume' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop cinder_volume service
           tags: step2
           service: name=openstack-cinder-volume state=stopped
index 09ea5d2..b49b29f 100644 (file)
@@ -138,6 +138,9 @@ outputs:
       service_config_settings:
         get_attr: [GlanceBase, role_data, service_config_settings]
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-glance-api is running"
+          shell: /usr/bin/systemctl show 'openstack-glance-api' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop glance_api service
           tags: step2
           service: name=openstack-glance-api state=stopped
index bb2ff58..2aea29f 100644 (file)
@@ -134,6 +134,9 @@ outputs:
       metadata_settings:
         get_attr: [ApacheServiceBase, role_data, metadata_settings]
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-gnocchi-api is running"
+          shell: /usr/bin/systemctl show 'openstack-gnocchi-api' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop gnocchi_api service (running under httpd)
           tags: step2
           service: name=httpd state=stopped
index d888e2a..1337b0c 100644 (file)
@@ -47,6 +47,9 @@ outputs:
       step_config: |
         include ::tripleo::profile::base::gnocchi::metricd
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-gnocchi-metricd is running"
+          shell: /usr/bin/systemctl show 'openstack-gnocchi-metricd' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop gnocchi_metricd service
           tags: step2
           service: name=openstack-gnocchi-metricd state=stopped
index d5012cb..41222a7 100644 (file)
@@ -46,6 +46,9 @@ outputs:
       step_config: |
         include ::tripleo::profile::base::gnocchi::statsd
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-gnocchi-statsd is running"
+          shell: /usr/bin/systemctl show 'openstack-gnocchi-statsd' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop gnocchi_statsd service
           tags: step2
           service: name=openstack-gnocchi-statsd state=stopped
index 981a08d..358698d 100644 (file)
@@ -78,6 +78,9 @@ outputs:
       step_config: |
         include ::tripleo::profile::base::haproxy
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service haproxy is running"
+          shell: /usr/bin/systemctl show 'haproxy' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop haproxy service
           tags: step1
           service: name=haproxy state=stopped
index 28317dd..7bd2fcf 100644 (file)
@@ -85,6 +85,9 @@ outputs:
               heat::keystone::auth_cfn::password: {get_param: HeatPassword}
               heat::keystone::auth_cfn::region: {get_param: KeystoneRegion}
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-heat-api-cfn is running"
+          shell: echo o/ #TODO uncomment when /#/c/423302/ : /usr/bin/systemctl show 'openstack-heat-api-cfn' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop heat_api_cfn service
           tags: step2
           service: name=openstack-heat-api-cfn state=stopped
index 5de25ab..0954ad1 100644 (file)
@@ -67,6 +67,9 @@ outputs:
       step_config: |
         include ::tripleo::profile::base::heat::api_cloudwatch
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-heat-api-cloudwatch is running"
+          shell: echo o/ #TODO uncomment when /#/c/423302/ : /usr/bin/systemctl show 'openstack-heat-api-cloudwatch' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop heat_api_cloudwatch service
           tags: step2
           service: name=openstack-heat-api-cloudwatch state=stopped
index 0ce8e1f..ae656b1 100644 (file)
@@ -85,6 +85,9 @@ outputs:
               heat::keystone::auth::password: {get_param: HeatPassword}
               heat::keystone::auth::region: {get_param: KeystoneRegion}
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-heat-api is running"
+          shell: echo o/ #TODO uncomment when /#/c/423302/ : /usr/bin/systemctl show 'openstack-heat-api' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop heat_api service
           tags: step2
           service: name=openstack-heat-api state=stopped
index 976d413..3b73eb8 100644 (file)
@@ -138,6 +138,9 @@ outputs:
             # This is needed because the keystone profile handles creating the domain
             tripleo::profile::base::keystone::heat_admin_password: {get_param: HeatStackDomainAdminPassword}
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service openstack-heat-engine is running"
+          shell: echo o/ #TODO uncomment when /#/c/423302/ : /usr/bin/systemctl show 'openstack-heat-engine' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop heat_engine service
           tags: step2
           service: name=openstack-heat-engine state=stopped
index cf44421..37368c8 100644 (file)
@@ -161,6 +161,9 @@ outputs:
             - '%'
             - "%{hiera('mysql_bind_host')}"
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service neutron-server is running"
+          shell: /usr/bin/systemctl show 'neutron-server' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop neutron_api service
           tags: step2
           service: name=neutron-server state=stopped
index bb4742c..062edaa 100644 (file)
@@ -80,6 +80,9 @@ outputs:
       step_config: |
         include tripleo::profile::base::neutron::dhcp
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service neutron-dhcp-agent is running"
+          shell: /usr/bin/systemctl show 'neutron-dhcp-agent' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop neutron_dhcp service
           tags: step2
           service: name=neutron-dhcp-agent state=stopped
index 9d85844..6980355 100644 (file)
@@ -80,6 +80,9 @@ outputs:
       step_config: |
         include tripleo::profile::base::neutron::l3
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service neutron-l3-agent is running"
+          shell: /usr/bin/systemctl show 'neutron-l3-agent' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop neutron_l3 service
           tags: step2
           service: name=neutron-l3-agent state=stopped
index 4306676..199b580 100644 (file)
@@ -76,6 +76,9 @@ outputs:
       step_config: |
         include tripleo::profile::base::neutron::metadata
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service neutron-metadata-agent is running"
+          shell: /usr/bin/systemctl show 'neutron-metadata-agent' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop neutron_metadata service
           tags: step2
           service: name=neutron-metadata-agent state=stopped
index baeb0c6..c27bb90 100644 (file)
@@ -121,6 +121,9 @@ outputs:
       step_config: |
         include ::tripleo::profile::base::neutron::ovs
       upgrade_tasks:
+        - name: "PreUpgrade step0,validation: Check service neutron-openvswitch-agent is running"
+          shell: /usr/bin/systemctl show 'neutron-openvswitch-agent' --property ActiveState | grep '\bactive\b'
+          tags: step0,validation
         - name: Stop neutron_ovs_agent service
           tags: step2
           service: name=neutron-openvswitch-agent state=stopped