Add validation task in docker services [Gnocchi]
Docker services are missing the pre-upgrade validation task in the upgrade_tasks section which verifies if the service is running before going on with the upgrade. Change-Id: I3db9c13709ef0dcc71fbaf51b80c498d7998daac Partial-Bug: #1704389
This commit is contained in:
parent
9bd858ebdf
commit
4f7753420a
docker/services
@ -169,8 +169,36 @@ outputs:
|
||||
path: /etc/ceph
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: Check if gnocchi_api is deployed
|
||||
command: systemctl is-enabled --quiet openstack-gnocchi-api
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: gnocchi_api_enabled
|
||||
- name: Check for gnocchi_api running under apache
|
||||
tags: common
|
||||
shell: "httpd -t -D DUMP_VHOSTS | grep -q gnocchi"
|
||||
ignore_errors: True
|
||||
register: httpd_enabled
|
||||
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-api is running"
|
||||
command: systemctl is-active --quiet openstack-gnocchi-api
|
||||
when: gnocchi_api_enabled.rc == 0 and httpd_enabled.rc != 0
|
||||
tags: step0,validation
|
||||
- name: Stop and disable gnocchi_api service
|
||||
tags: step2
|
||||
service: name=openstack-gnocchi-api state=stopped enabled=no
|
||||
when: gnocchi_api_enabled.rc == 0 and httpd_enabled.rc != 0
|
||||
- name: Check if httpd service is running
|
||||
command: systemctl is-active --quiet httpd
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: httpd_running
|
||||
- name: "PreUpgrade step0,validation: Check if gnocchi_api_wsgi is running"
|
||||
shell: systemctl status 'httpd' | grep -q gnocchi
|
||||
tags: step0,validation
|
||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
||||
- name: Stop and disable httpd service
|
||||
tags: step2
|
||||
when: httpd_enabled.rc == 0 and httpd_running.rc == 0
|
||||
service: name=httpd state=stopped enabled=no
|
||||
metadata_settings:
|
||||
get_attr: [GnocchiApiPuppetBase, role_data, metadata_settings]
|
||||
|
@ -118,6 +118,16 @@ outputs:
|
||||
path: /etc/ceph
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: Check if gnocchi_metricd is deployed
|
||||
command: systemctl is-enabled --quiet openstack-gnocchi-metricd
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: gnocchi_metricd_enabled
|
||||
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-metricd is running"
|
||||
command: systemctl is-active --quiet openstack-gnocchi-metricd
|
||||
when: gnocchi_metricd_enabled.rc == 0
|
||||
tags: step0,validation
|
||||
- name: Stop and disable openstack-gnocchi-metricd service
|
||||
tags: step2
|
||||
when: gnocchi_metricd_enabled.rc == 0
|
||||
service: name=openstack-gnocchi-metricd.service state=stopped enabled=no
|
||||
|
@ -118,6 +118,16 @@ outputs:
|
||||
path: /etc/ceph
|
||||
state: directory
|
||||
upgrade_tasks:
|
||||
- name: Check if gnocchi_statsd is deployed
|
||||
command: systemctl is-enabled --quiet openstack-gnocchi-statsd
|
||||
tags: common
|
||||
ignore_errors: True
|
||||
register: gnocchi_statsd_enabled
|
||||
- name: "PreUpgrade step0,validation: Check service openstack-gnocchi-statsd is running"
|
||||
command: systemctl is-active --quiet openstack-gnocchi-statsd
|
||||
when: gnocchi_statsd_enabled.rc == 0
|
||||
tags: step0,validation
|
||||
- name: Stop and disable openstack-gnocchi-statsd service
|
||||
tags: step2
|
||||
when: gnocchi_statsd_enabled.rc == 0
|
||||
service: name=openstack-gnocchi-statsd.service state=stopped enabled=no
|
||||
|
Loading…
x
Reference in New Issue
Block a user