Merge "FFU: Fix gnocchi FFU tasks" into stable/queens

This commit is contained in:
Zuul 2018-03-29 02:58:19 +00:00 committed by Gerrit Code Review
commit 0c81385b45
3 changed files with 93 additions and 8 deletions

View File

@ -244,8 +244,75 @@ outputs:
metadata_settings:
get_attr: [GnocchiApiPuppetBase, role_data, metadata_settings]
fast_forward_upgrade_tasks:
- name: Stop gnocchi (under httpd)
service: name=httpd state=stopped
- name: Check if httpd service is running
command: systemctl is-active --quiet httpd
tags: common
ignore_errors: True
register: httpd_running_result
when:
- step|int == 2
- step|int == 0
- release == 'ocata'
- httpd_running is undefined
- name: Set fact httpd_running if unset
set_fact:
httpd_running: "{{ httpd_running_result.rc == 0 }}"
when:
- step|int == 0
- release == 'ocata'
- httpd_running is undefined
- name: Check if gnocchi_api is deployed
command: systemctl is-enabled --quiet openstack-gnocchi-api
tags: common
ignore_errors: True
register: gnocchi_api_enabled_result
when:
- step|int == 0
- release == 'ocata'
- name: Set fact gnocchi_api_enabled
set_fact:
gnocchi_api_enabled: "{{ gnocchi_api_enabled_result.rc == 0 }}"
when:
- step|int == 0
- release == 'ocata'
- name: Check for gnocchi_api running under apache
tags: common
shell: "httpd -t -D DUMP_VHOSTS | grep -q gnocchi"
ignore_errors: True
register: gnocchi_httpd_enabled_result
when:
- step|int == 0
- release == 'ocata'
- name: Set fact gnocchi_httpd_enabled
set_fact:
gnocchi_httpd_enabled: "{{ gnocchi_httpd_enabled_result.rc == 0 }}"
when:
- step|int == 0
- release == 'ocata'
- name: Stop and disable gnocchi_api service
service: name=openstack-gnocchi-api state=stopped enabled=no
when:
- step|int == 1
- release == 'ocata'
- gnocchi_api_enabled|bool
- name: Stop and disable httpd service
when:
- step|int == 1
- release == 'ocata'
- gnocchi_httpd_enabled|bool
- httpd_running|bool
service: name=httpd state=stopped enabled=no
- name: Update gnocchi packages
yum: name={{ item }} state=latest
# (pradk): We have to explicitly update numpy as its obsoleted
# by python2-numpy.
with_items:
- openstack-gnocchi*
- numpy
when:
- step|int == 6
- is_bootstrap_node|bool
- name: Sync gnocchi DB
command: gnocchi-upgrade --skip-storage
when:
- step|int == 8
- is_bootstrap_node|bool

View File

@ -164,10 +164,19 @@ outputs:
- name: FFU check if openstack-gnocchi-metricd is deployed
command: systemctl is-enabled --quiet openstack-gnocchi-metricd
ignore_errors: True
register: gnocchi_metricd_enabled
register: gnocchi_metricd_enabled_result
when:
- step|int == 0
- release == 'ocata'
- name: Set fact gnocchi_metricd_enabled
set_fact:
gnocchi_metricd_enabled: "{{ gnocchi_metricd_enabled_result.rc == 0 }}"
when:
- step|int == 0
- release == 'ocata'
- name: FFU stop and disable openstack-gnocchi-metricd service
service: name=openstack-gnocchi-metricd state=stopped enabled=no
when:
- step|int == 2
- step|int == 1
- release == 'ocata'
- gnocchi_metricd_enabled.rc == 0
- gnocchi_metricd_enabled|bool

View File

@ -164,10 +164,19 @@ outputs:
- name: FFU check if openstack-gnocchi-statsd is deployed
command: systemctl is-enabled --quiet openstack-gnocchi-statsd
ignore_errors: True
register: gnocchi_statsd_enabled
register: gnocchi_statsd_enabled_result
when:
- step|int == 0
- release == 'ocata'
- name: Set fact gnocchi_statsd_enabled
set_fact:
gnocchi_statsd_enabled: "{{ gnocchi_statsd_enabled_result.rc == 0 }}"
when:
- step|int == 0
- release == 'ocata'
- name: FFU stop and disable openstack-gnocchi-statsd service
service: name=openstack-gnocchi-statsd state=stopped enabled=no
when:
- step|int == 2
- release == 'ocata'
- gnocchi_statsd_enabled.rc == 0
- gnocchi_statsd_enabled|bool