Browse Source

upgrades/validation: only run validation when services exist

During upgrades, validation test if a service is running before the
upgrade process starts.
In some cases, servies doesn't exist yet so we don't want to run the
validation.

This patch makes sure we check if the service is actually present on the
system before validating it's running correctly.

Also it makes sure that services are enabled before trying to stop them.
It allows use-cases where we want to add new services during an upgrade.
Also install new packages of services added in Ocata, so we can validate
upgrades on scenarios jobs.

Change-Id: Ib48fb6b1557be43956557cbde4cbe26b53a50bd8
changes/57/438657/12
Emilien Macchi 4 years ago
parent
commit
7c84a9b390
  1. 7
      puppet/services/aodh-evaluator.yaml
  2. 7
      puppet/services/aodh-listener.yaml
  3. 7
      puppet/services/aodh-notifier.yaml
  4. 6
      puppet/services/apache-internal-tls-certmonger.yaml
  5. 6
      puppet/services/apache.yaml
  6. 3
      puppet/services/auditd.yaml
  7. 10
      puppet/services/barbican-api.yaml
  8. 7
      puppet/services/ceilometer-agent-central.yaml
  9. 7
      puppet/services/ceilometer-agent-compute.yaml
  10. 7
      puppet/services/ceilometer-agent-notification.yaml
  11. 7
      puppet/services/ceilometer-collector.yaml
  12. 9
      puppet/services/ceph-rgw.yaml
  13. 7
      puppet/services/cinder-api.yaml
  14. 7
      puppet/services/cinder-scheduler.yaml
  15. 7
      puppet/services/cinder-volume.yaml
  16. 11
      puppet/services/congress.yaml
  17. 7
      puppet/services/ec2-api.yaml
  18. 14
      puppet/services/glance-api.yaml
  19. 7
      puppet/services/gnocchi-metricd.yaml
  20. 7
      puppet/services/gnocchi-statsd.yaml
  21. 8
      puppet/services/haproxy.yaml
  22. 7
      puppet/services/heat-api-cfn.yaml
  23. 7
      puppet/services/heat-api-cloudwatch.yaml
  24. 7
      puppet/services/heat-api.yaml
  25. 7
      puppet/services/heat-engine.yaml
  26. 3
      puppet/services/horizon.yaml
  27. 11
      puppet/services/logging/fluentd-client.yaml
  28. 11
      puppet/services/metrics/collectd.yaml
  29. 11
      puppet/services/monitoring/sensu-client.yaml
  30. 7
      puppet/services/neutron-api.yaml
  31. 7
      puppet/services/neutron-dhcp.yaml
  32. 7
      puppet/services/neutron-l3.yaml
  33. 7
      puppet/services/neutron-metadata.yaml
  34. 7
      puppet/services/neutron-ovs-agent.yaml
  35. 11
      puppet/services/tacker.yaml
  36. 7
      puppet/services/zaqar.yaml

7
puppet/services/aodh-evaluator.yaml

@ -41,9 +41,16 @@ outputs:
step_config: |
include tripleo::profile::base::aodh::evaluator
upgrade_tasks:
- name: Check if aodh_evaluator is deployed
command: systemctl is-enabled openstack-aodh-evaluator
tags: common
ignore_errors: True
register: aodh_evaluator_enabled
- name: "PreUpgrade step0,validation: Check service openstack-aodh-evaluator is running"
shell: /usr/bin/systemctl show 'openstack-aodh-evaluator' --property ActiveState | grep '\bactive\b'
when: aodh_evaluator_enabled.rc == 0
tags: step0,validation
- name: Stop aodh_evaluator service
tags: step1
when: aodh_evaluator_enabled.rc == 0
service: name=openstack-aodh-evaluator state=stopped

7
puppet/services/aodh-listener.yaml

@ -41,9 +41,16 @@ outputs:
step_config: |
include tripleo::profile::base::aodh::listener
upgrade_tasks:
- name: Check if aodh_listener is deployed
command: systemctl is-enabled openstack-aodh-listener
tags: common
ignore_errors: True
register: aodh_listener_enabled
- name: "PreUpgrade step0,validation: Check service openstack-aodh-listener is running"
shell: /usr/bin/systemctl show 'openstack-aodh-listener' --property ActiveState | grep '\bactive\b'
when: aodh_listener_enabled.rc == 0
tags: step0,validation
- name: Stop aodh_listener service
tags: step1
when: aodh_listener_enabled.rc == 0
service: name=openstack-aodh-listener state=stopped

7
puppet/services/aodh-notifier.yaml

@ -41,9 +41,16 @@ outputs:
step_config: |
include tripleo::profile::base::aodh::notifier
upgrade_tasks:
- name: Check if aodh_notifier is deployed
command: systemctl is-enabled openstack-aodh-notifier
tags: common
ignore_errors: True
register: aodh_notifier_enabled
- name: "PreUpgrade step0,validation: Check service openstack-aodh-notifier is running"
shell: /usr/bin/systemctl show 'openstack-aodh-notifier' --property ActiveState | grep '\bactive\b'
when: aodh_notifier_enabled.rc == 0
tags: step0,validation
- name: Stop aodh_notifier service
tags: step1
when: aodh_notifier_enabled.rc == 0
service: name=openstack-aodh-notifier state=stopped

6
puppet/services/apache-internal-tls-certmonger.yaml

@ -64,6 +64,12 @@ outputs:
for_each:
$NETWORK: {get_attr: [ApacheNetworks, value]}
upgrade_tasks:
- name: Check if httpd is deployed
command: systemctl is-enabled httpd
tags: common
ignore_errors: True
register: httpd_enabled
- name: "PreUpgrade step0,validation: Check service httpd is running"
shell: /usr/bin/systemctl show 'httpd' --property ActiveState | grep '\bactive\b'
when: httpd_enabled.rc == 0
tags: step0,validation

6
puppet/services/apache.yaml

@ -67,6 +67,12 @@ outputs:
metadata_settings:
get_attr: [ApacheTLS, role_data, metadata_settings]
upgrade_tasks:
- name: Check if httpd is deployed
command: systemctl is-enabled httpd
tags: common
ignore_errors: True
register: httpd_enabled
- name: "PreUpgrade step0,validation: Check service httpd is running"
shell: /usr/bin/systemctl show 'httpd' --property ActiveState | grep '\bactive\b'
when: httpd_enabled.rc == 0
tags: step0,validation

3
puppet/services/auditd.yaml

@ -35,7 +35,7 @@ outputs:
upgrade_tasks:
- name: Check if auditd is deployed
command: systemctl is-enabled auditd
tags: step0,validation
tags: common
ignore_errors: True
register: auditd_enabled
- name: "PreUpgrade step0,validation: Check if auditd is running"
@ -46,4 +46,5 @@ outputs:
tags: step0,validation
- name: Stop auditd service
tags: step2
when: auditd_enabled.rc == 0
service: name=auditd state=stopped

10
puppet/services/barbican-api.yaml

@ -146,6 +146,16 @@ outputs:
metadata_settings:
get_attr: [ApacheServiceBase, role_data, metadata_settings]
upgrade_tasks:
- name: Check if barbican_api is deployed
command: systemctl is-enabled openstack-barbican-api
tags: common
ignore_errors: True
register: barbican_api_enabled
- name: "PreUpgrade step0,validation: Check service openstack-barbican-api is running"
shell: /usr/bin/systemctl show 'openstack-barbican-api' --property ActiveState | grep '\bactive\b'
when: barbican_api_enabled.rc == 0
tags: step0,validation
- name: Install openstack-barbican-api package if it was disabled
tags: step3
yum: name=openstack-barbican-api state=latest
when: barbican_api_enabled.rc != 0

7
puppet/services/ceilometer-agent-central.yaml

@ -56,9 +56,16 @@ outputs:
step_config: |
include ::tripleo::profile::base::ceilometer::agent::polling
upgrade_tasks:
- name: Check if ceilometer_agent_central is deployed
command: systemctl is-enabled openstack-ceilometer-central
tags: common
ignore_errors: True
register: ceilometer_agent_central_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-central is running"
shell: /usr/bin/systemctl show 'openstack-ceilometer-central' --property ActiveState | grep '\bactive\b'
when: ceilometer_agent_central_enabled.rc == 0
tags: step0,validation
- name: Stop ceilometer_agent_central service
tags: step1
when: ceilometer_agent_central_enabled.rc == 0
service: name=openstack-ceilometer-central state=stopped

7
puppet/services/ceilometer-agent-compute.yaml

@ -50,9 +50,16 @@ outputs:
step_config: |
include ::tripleo::profile::base::ceilometer::agent::polling
upgrade_tasks:
- name: Check if ceilometer_agent_compute is deployed
command: systemctl is-enabled openstack-ceilometer-compute
tags: common
ignore_errors: True
register: ceilometer_agent_compute_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-compute is running"
shell: /usr/bin/systemctl show 'openstack-ceilometer-compute' --property ActiveState | grep '\bactive\b'
when: ceilometer_agent_compute_enabled.rc == 0
tags: step0,validation
- name: Stop ceilometer_agent_compute service
tags: step1
when: ceilometer_agent_compute_enabled.rc == 0
service: name=openstack-ceilometer-compute state=stopped

7
puppet/services/ceilometer-agent-notification.yaml

@ -50,9 +50,16 @@ outputs:
step_config: |
include ::tripleo::profile::base::ceilometer::agent::notification
upgrade_tasks:
- name: Check if ceilometer_agent_notification is deployed
command: systemctl is-enabled openstack-ceilometer-notification
tags: common
ignore_errors: True
register: ceilometer_agent_notification_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-notification is running"
shell: /usr/bin/systemctl show 'openstack-ceilometer-notification' --property ActiveState | grep '\bactive\b'
when: ceilometer_agent_notification_enabled.rc == 0
tags: step0,validation
- name: Stop ceilometer_agent_notification service
tags: step1
when: ceilometer_agent_notification_enabled.rc == 0
service: name=openstack-ceilometer-notification state=stopped

7
puppet/services/ceilometer-collector.yaml

@ -60,9 +60,16 @@ outputs:
step_config: |
include ::tripleo::profile::base::ceilometer::collector
upgrade_tasks:
- name: Check if ceilometer_collector is deployed
command: systemctl is-enabled openstack-ceilometer-collector
tags: common
ignore_errors: True
register: ceilometer_collector_enabled
- name: "PreUpgrade step0,validation: Check service openstack-ceilometer-collector is running"
shell: /usr/bin/systemctl show 'openstack-ceilometer-collector' --property ActiveState | grep '\bactive\b'
when: ceilometer_collector_enabled.rc == 0
tags: step0,validation
- name: Stop ceilometer_collector service
tags: step1
when: ceilometer_collector_enabled.rc == 0
service: name=openstack-ceilometer-collector state=stopped

9
puppet/services/ceph-rgw.yaml

@ -79,14 +79,21 @@ outputs:
ceph::rgw::keystone::auth::password: {get_param: SwiftPassword}
upgrade_tasks:
- name: Gather RGW instance ID
tags: step0
tags: common
shell: hiera -c /etc/puppet/hiera.yaml ceph::profile::params::rgw_name radosgw.gateway
register: rgw_id
- name: Check if ceph_rgw is deployed
command: systemctl is-enabled ceph-radosgw@{{rgw_id.stdout}}
tags: common
ignore_errors: True
register: ceph_rgw_enabled
- name: Check status
shell: /usr/bin/systemctl show ceph-radosgw@{{rgw_id.stdout}} --property ActiveState | grep '\bactive\b'
when: ceph_rgw_enabled.rc == 0
tags: step0,validation
- name: Stop RGW instance
tags: step1
when: ceph_rgw_enabled.rc == 0
service:
name: ceph-radosgw@{{rgw_id.stdout}}
state: stopped

7
puppet/services/cinder-api.yaml

@ -150,8 +150,14 @@ outputs:
metadata_settings:
get_attr: [ApacheServiceBase, role_data, metadata_settings]
upgrade_tasks:
- name: Check if cinder_api is deployed
command: systemctl is-enabled openstack-cinder-api
tags: common
ignore_errors: True
register: cinder_api_enabled
- name: "PreUpgrade step0,validation: Check service openstack-cinder-api is running"
shell: /usr/bin/systemctl show 'openstack-cinder-api' --property ActiveState | grep '\bactive\b'
when: cinder_api_enabled.rc == 0
tags: step0,validation
- name: check for cinder running under apache (post upgrade)
tags: step1
@ -164,4 +170,5 @@ outputs:
when: "cinder_apache.rc == 0"
- name: Stop and disable cinder_api service (pre-upgrade not under httpd)
tags: step1
when: cinder_api_enabled.rc == 0
service: name=openstack-cinder-api state=stopped enabled=no

7
puppet/services/cinder-scheduler.yaml

@ -52,9 +52,16 @@ outputs:
step_config: |
include ::tripleo::profile::base::cinder::scheduler
upgrade_tasks:
- name: Check if cinder_scheduler is deployed
command: systemctl is-enabled openstack-cinder-scheduler
tags: common
ignore_errors: True
register: cinder_scheduler_enabled
- name: "PreUpgrade step0,validation: Check service openstack-cinder-scheduler is running"
shell: /usr/bin/systemctl show 'openstack-cinder-scheduler' --property ActiveState | grep '\bactive\b'
when: cinder_scheduler_enabled.rc == 0
tags: step0,validation
- name: Stop cinder_scheduler service
tags: step1
when: cinder_scheduler_enabled.rc == 0
service: name=openstack-cinder-scheduler state=stopped

7
puppet/services/cinder-volume.yaml

@ -116,9 +116,16 @@ outputs:
step_config: |
include ::tripleo::profile::base::cinder::volume
upgrade_tasks:
- name: Check if cinder_volume is deployed
command: systemctl is-enabled openstack-cinder-volume
tags: common
ignore_errors: True
register: cinder_volume_enabled
- name: "PreUpgrade step0,validation: Check service openstack-cinder-volume is running"
shell: /usr/bin/systemctl show 'openstack-cinder-volume' --property ActiveState | grep '\bactive\b'
when: cinder_volume_enabled.rc == 0
tags: step0,validation
- name: Stop cinder_volume service
tags: step1
when: cinder_volume_enabled.rc == 0
service: name=openstack-cinder-volume state=stopped

11
puppet/services/congress.yaml

@ -97,9 +97,20 @@ outputs:
include ::tripleo::profile::base::congress
upgrade_tasks:
- name: Check if congress is deployed
command: systemctl is-enabled openstack-congress-server
tags: common
ignore_errors: True
register: congress_enabled
- name: "PreUpgrade step0,validation: Check service openstack-congress-server is running"
shell: /usr/bin/systemctl show 'openstack-congress-server' --property ActiveState | grep '\bactive\b'
when: congress_enabled.rc == 0
tags: step0,validation
- name: Stop congress service
tags: step1
when: congress_enabled.rc == 0
service: name=openstack-congress-server state=stopped
- name: Install openstack-congress package if it was disabled
tags: step3
yum: name=openstack-congress state=latest
when: congress_enabled.rc != 0

7
puppet/services/ec2-api.yaml

@ -118,7 +118,7 @@ outputs:
upgrade_tasks:
- name: Check if ec2-api is deployed
command: systemctl is-enabled openstack-ec2-api
tags: step0,validation
tags: common
ignore_errors: True
register: ec2_api_enabled
- name: "PreUpgrade step0,validation: Check if openstack-ec2-api is running"
@ -129,5 +129,10 @@ outputs:
tags: step0,validation
- name: Stop openstack-ec2-api service
tags: step1
when: ec2_api_enabled.rc == 0
service: name=openstack-ec2-api state=stopped
- name: Install openstack-ec2-api package if it was disabled
tags: step3
yum: name=openstack-ec2-api state=latest
when: ec2_api_enabled.rc != 0

14
puppet/services/glance-api.yaml

@ -137,12 +137,26 @@ outputs:
service_config_settings:
get_attr: [GlanceBase, role_data, service_config_settings]
upgrade_tasks:
- name: Check if glance_api is deployed
command: systemctl is-enabled openstack-glance-api
tags: common
ignore_errors: True
register: glance_api_enabled
#(TODO) Remove all glance-registry bits in Pike.
- name: Check if glance_registry is deployed
command: systemctl is-enabled openstack-glance-registry
tags: common
ignore_errors: True
register: glance_registry_enabled
- 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
when: glance_api_enabled.rc == 0
- name: Stop glance_api service
tags: step1
when: glance_api_enabled.rc == 0
service: name=openstack-glance-api state=stopped
- name: Stop and disable glance registry (removed for Ocata)
tags: step1
when: glance_registry_enabled.rc == 0
service: name=openstack-glance-registry state=stopped enabled=no

7
puppet/services/gnocchi-metricd.yaml

@ -47,9 +47,16 @@ outputs:
step_config: |
include ::tripleo::profile::base::gnocchi::metricd
upgrade_tasks:
- name: Check if gnocchi_metricd is deployed
command: systemctl is-enabled openstack-gnocchi-metricd
tags: common
ignore_errors: True
register: gnocchi_metricd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-metricd is running"
shell: /usr/bin/systemctl show 'openstack-gnocchi-metricd' --property ActiveState | grep '\bactive\b'
when: gnocchi_metricd_enabled.rc == 0
tags: step0,validation
- name: Stop gnocchi_metricd service
tags: step1
when: gnocchi_metricd_enabled.rc == 0
service: name=openstack-gnocchi-metricd state=stopped

7
puppet/services/gnocchi-statsd.yaml

@ -46,9 +46,16 @@ outputs:
step_config: |
include ::tripleo::profile::base::gnocchi::statsd
upgrade_tasks:
- name: Check if gnocchi_statsd is deployed
command: systemctl is-enabled openstack-gnocchi-statsd
tags: common
ignore_errors: True
register: gnocchi_statsd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-statsd is running"
shell: /usr/bin/systemctl show 'openstack-gnocchi-statsd' --property ActiveState | grep '\bactive\b'
when: gnocchi_statsd_enabled.rc == 0
tags: step0,validation
- name: Stop gnocchi_statsd service
tags: step1
when: gnocchi_statsd_enabled.rc == 0
service: name=openstack-gnocchi-statsd state=stopped

8
puppet/services/haproxy.yaml

@ -78,14 +78,22 @@ outputs:
step_config: |
include ::tripleo::profile::base::haproxy
upgrade_tasks:
- name: Check if haproxy is deployed
command: systemctl is-enabled haproxy
tags: common
ignore_errors: True
register: haproxy_enabled
- name: "PreUpgrade step0,validation: Check service haproxy is running"
shell: /usr/bin/systemctl show 'haproxy' --property ActiveState | grep '\bactive\b'
when: haproxy_enabled.rc == 0
tags: step0,validation
- name: Stop haproxy service
tags: step2
when: haproxy_enabled.rc == 0
service: name=haproxy state=stopped
- name: Start haproxy service
tags: step4 # Needed at step 4 for mysql
when: haproxy_enabled.rc == 0
service: name=haproxy state=started
metadata_settings:
yaql:

7
puppet/services/heat-api-cfn.yaml

@ -85,9 +85,16 @@ outputs:
heat::keystone::auth_cfn::password: {get_param: HeatPassword}
heat::keystone::auth_cfn::region: {get_param: KeystoneRegion}
upgrade_tasks:
- name: Check if heat_api_cfn is deployed
command: systemctl is-enabled openstack-heat-api-cfn
tags: common
ignore_errors: True
register: heat_api_cfn_enabled
- name: "PreUpgrade step0,validation: Check service openstack-heat-api-cfn is running"
shell: /usr/bin/systemctl show 'openstack-heat-api-cfn' --property ActiveState | grep '\bactive\b'
when: heat_api_cfn_enabled.rc == 0
tags: step0,validation
- name: Stop heat_api_cfn service
tags: step1
when: heat_api_cfn_enabled.rc == 0
service: name=openstack-heat-api-cfn state=stopped

7
puppet/services/heat-api-cloudwatch.yaml

@ -67,9 +67,16 @@ outputs:
step_config: |
include ::tripleo::profile::base::heat::api_cloudwatch
upgrade_tasks:
- name: Check if heat_api_cloudwatch is deployed
command: systemctl is-enabled openstack-heat-api-cloudwatch
tags: common
ignore_errors: True
register: heat_api_cloudwatch_enabled
- name: "PreUpgrade step0,validation: Check service openstack-heat-api-cloudwatch is running"
shell: /usr/bin/systemctl show 'openstack-heat-api-cloudwatch' --property ActiveState | grep '\bactive\b'
when: heat_api_cloudwatch_enabled.rc == 0
tags: step0,validation
- name: Stop heat_api_cloudwatch service
tags: step1
when: heat_api_cloudwatch_enabled.rc == 0
service: name=openstack-heat-api-cloudwatch state=stopped

7
puppet/services/heat-api.yaml

@ -85,9 +85,16 @@ outputs:
heat::keystone::auth::password: {get_param: HeatPassword}
heat::keystone::auth::region: {get_param: KeystoneRegion}
upgrade_tasks:
- name: Check is heat_api is deployed
command: systemctl is-enabled openstack-heat-api
tags: common
ignore_errors: True
register: heat_api_enabled
- name: "PreUpgrade step0,validation: Check service openstack-heat-api is running"
shell: /usr/bin/systemctl show 'openstack-heat-api' --property ActiveState | grep '\bactive\b'
when: heat_api_enabled.rc == 0
tags: step0,validation
- name: Stop heat_api service
tags: step1
when: heat_api_enabled.rc == 0
service: name=openstack-heat-api state=stopped

7
puppet/services/heat-engine.yaml

@ -137,9 +137,16 @@ 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: Check if heat_engine is deployed
command: systemctl is-enabled openstack-heat-engine
tags: common
ignore_errors: True
register: heat_engine_enabled
- name: "PreUpgrade step0,validation: Check service openstack-heat-engine is running"
shell: /usr/bin/systemctl show 'openstack-heat-engine' --property ActiveState | grep '\bactive\b'
when: heat_engine_enabled.rc == 0
tags: step0,validation
- name: Stop heat_engine service
tags: step1
when: heat_engine_enabled.rc == 0
service: name=openstack-heat-engine state=stopped

3
puppet/services/horizon.yaml

@ -100,7 +100,7 @@ outputs:
upgrade_tasks:
- name: Check if httpd is deployed
command: systemctl is-enabled httpd
tags: step0,validation
tags: common
ignore_errors: True
register: httpd_enabled
- name: "PreUpgrade step0,validation: Check if httpd is running"
@ -111,4 +111,5 @@ outputs:
tags: step0,validation
- name: Stop Horizon (under httpd)
tags: step1
when: httpd_enabled.rc == 0
service: name=httpd state=stopped

11
puppet/services/logging/fluentd-client.yaml

@ -63,11 +63,22 @@ outputs:
step_config: |
include ::tripleo::profile::base::logging::fluentd
upgrade_tasks:
- name: Check if fluentd_client is deployed
command: systemctl is-enabled fluentd
tags: common
ignore_errors: True
register: fluentd_client_enabled
- name: Check status of fluentd service
shell: >
/usr/bin/systemctl show fluentd --property ActiveState |
grep '\bactive\b'
when: fluentd_client_enabled.rc == 0
tags: step0,validation
- name: Stop fluentd service
tags: step1
when: fluentd_client_enabled.rc == 0
service: name=fluentd state=stopped
- name: Install fluentd package if it was disabled
tags: step3
yum: name=fluentd state=latest
when: fluentd_client_enabled.rc != 0

11
puppet/services/metrics/collectd.yaml

@ -110,11 +110,22 @@ outputs:
step_config: |
include ::tripleo::profile::base::metrics::collectd
upgrade_tasks:
- name: Check if collectd is deployed
command: systemctl is-enabled collectd
tags: common
ignore_errors: True
register: collectd_enabled
- name: Check status of collectd service
shell: >
/usr/bin/systemctl show collectd --property ActiveState |
grep '\bactive\b'
when: collectd_enabled.rc == 0
tags: step0,validation
- name: Stop collectd service
tags: step1
when: collectd_enabled.rc == 0
service: name=collectd state=stopped
- name: Install collectd package if it was disabled
tags: step3
yum: name=collectd state=latest
when: collectd_enabled.rc != 0

11
puppet/services/monitoring/sensu-client.yaml

@ -63,11 +63,22 @@ outputs:
step_config: |
include ::tripleo::profile::base::monitoring::sensu
upgrade_tasks:
- name: Check if sensu_client is deployed
command: systemctl is-enabled sensu-client
tags: common
ignore_errors: True
register: sensu_client_enabled
- name: Check status of sensu-client service
shell: >
/usr/bin/systemctl show sensu-client --property ActiveState |
grep '\bactive\b'
when: sensu_client_enabled.rc == 0
tags: step0,validation
- name: Stop sensu-client service
tags: step1
when: sensu_client_enabled.rc == 0
service: name=sensu-client state=stopped
- name: Install sensu package if it was disabled
tags: step3
yum: name=sensu state=latest
when: sensu_client.rc != 0

7
puppet/services/neutron-api.yaml

@ -189,9 +189,16 @@ outputs:
- '%'
- "%{hiera('mysql_bind_host')}"
upgrade_tasks:
- name: Check if neutron_server is deployed
command: systemctl is-enabled neutron-server
tags: common
ignore_errors: True
register: neutron_server_enabled
- name: "PreUpgrade step0,validation: Check service neutron-server is running"
shell: /usr/bin/systemctl show 'neutron-server' --property ActiveState | grep '\bactive\b'
when: neutron_server_enabled.rc == 0
tags: step0,validation
- name: Stop neutron_api service
tags: step1
when: neutron_server_enabled.rc == 0
service: name=neutron-server state=stopped

7
puppet/services/neutron-dhcp.yaml

@ -80,9 +80,16 @@ outputs:
step_config: |
include tripleo::profile::base::neutron::dhcp
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 neutron_dhcp service
tags: step1
when: neutron_dhcp_agent_enabled.rc == 0
service: name=neutron-dhcp-agent state=stopped

7
puppet/services/neutron-l3.yaml

@ -85,9 +85,16 @@ outputs:
step_config: |
include tripleo::profile::base::neutron::l3
upgrade_tasks:
- name: Check if neutron_l3_agent is deployed
command: systemctl is-enabled neutron-l3-agent
tags: common
ignore_errors: True
register: neutron_l3_agent_enabled
- name: "PreUpgrade step0,validation: Check service neutron-l3-agent is running"
shell: /usr/bin/systemctl show 'neutron-l3-agent' --property ActiveState | grep '\bactive\b'
when: neutron_l3_agent_enabled.rc == 0
tags: step0,validation
- name: Stop neutron_l3 service
tags: step1
when: neutron_l3_agent_enabled.rc == 0
service: name=neutron-l3-agent state=stopped

7
puppet/services/neutron-metadata.yaml

@ -76,9 +76,16 @@ outputs:
step_config: |
include tripleo::profile::base::neutron::metadata
upgrade_tasks:
- name: Check if neutron_metadata_agent is deployed
command: systemctl is-enabled neutron-metadata-agent
tags: common
ignore_errors: True
register: neutron_metadata_agent_enabled
- name: "PreUpgrade step0,validation: Check service neutron-metadata-agent is running"
shell: /usr/bin/systemctl show 'neutron-metadata-agent' --property ActiveState | grep '\bactive\b'
when: neutron_metadata_agent_enabled.rc == 0
tags: step0,validation
- name: Stop neutron_metadata service
tags: step1
when: neutron_metadata_agent_enabled.rc == 0
service: name=neutron-metadata-agent state=stopped

7
puppet/services/neutron-ovs-agent.yaml

@ -121,9 +121,16 @@ outputs:
step_config: |
include ::tripleo::profile::base::neutron::ovs
upgrade_tasks:
- name: Check if neutron_ovs_agent is deployed
command: systemctl is-enabled neutron-openvswitch-agent
tags: common
ignore_errors: True
register: neutron_ovs_agent_enabled
- name: "PreUpgrade step0,validation: Check service neutron-openvswitch-agent is running"
shell: /usr/bin/systemctl show 'neutron-openvswitch-agent' --property ActiveState | grep '\bactive\b'
when: neutron_ovs_agent_enabled.rc == 0
tags: step0,validation
- name: Stop neutron_ovs_agent service
tags: step1
when: neutron_ovs_agent_enabled.rc == 0
service: name=neutron-openvswitch-agent state=stopped

11
puppet/services/tacker.yaml

@ -97,9 +97,20 @@ outputs:
step_config: |
include ::tripleo::profile::base::tacker
upgrade_tasks:
- name: Check if tacker is deployed
command: systemctl is-enabled openstack-tacker-server
tags: common
ignore_errors: True
register: tacker_enabled
- name: "PreUpgrade step0,validation: Check service openstack-tacker-server is running"
shell: /usr/bin/systemctl show 'openstack-tacker-server' --property ActiveState | grep '\bactive\b'
when: tacker_enabled.rc == 0
tags: step0,validation
- name: Stop tacker service
tags: step1
when: tacker_enabled.rc == 0
service: name=openstack-tacker-server state=stopped
- name: Install openstack-tacker package if it was disabled
tags: step3
yum: name=openstack-tacker state=latest
when: tacker_enabled.rc != 0

7
puppet/services/zaqar.yaml

@ -67,7 +67,7 @@ outputs:
upgrade_tasks:
- name: Check if zaqar is deployed
command: systemctl is-enabled openstack-zaqar
tags: step0,validation
tags: common
ignore_errors: True
register: zaqar_enabled
- name: "PreUpgrade step0,validation: Check if openstack-zaqar is running"
@ -78,4 +78,9 @@ outputs:
tags: step0,validation
- name: Stop zaqar service
tags: step1
when: zaqar_enabled.rc == 0
service: name=openstack-zaqar state=stopped
- name: Install openstack-zaqar package if it was disabled
tags: step3
yum: name=openstack-zaqar state=latest
when: zaqar_enabled.rc != 0
Loading…
Cancel
Save