Merge "Add validation task in docker services [Octavia]"

This commit is contained in:
Zuul 2018-04-12 08:40:26 +00:00 committed by Gerrit Code Review
commit 7cdfd46dd5
4 changed files with 81 additions and 4 deletions

View File

@ -183,6 +183,44 @@ outputs:
/var/log/containers/octavia and /var/log/containers/httpd/octavia-api.
ignore_errors: true
upgrade_tasks:
- name: Check if octavia_api is deployed
command: systemctl is-enabled --quiet openstack-octavia-api
tags: common
ignore_errors: True
register: octavia_api_enabled
- name: Check for octavia-api running under apache
tags: common
shell: httpd -t -D DUMP_VHOSTS | grep -q 'octavia'
ignore_errors: True
register: httpd_enabled
- name: "PreUpgrade step0,validation: Check service openstack-octavia-api is running"
command: systemctl is-active --quiet openstack-octavia-api
tags: validation
when:
- step|int == 0
- octavia_api_enabled.rc == 0
- httpd_enabled.rc != 0
- name: Stop and disable octavia_api service
when: step|int == 2
service: name=openstack-octavia-api state=stopped enabled=no
when:
- step|int == 2
- octavia_api_enabled.rc == 0
- 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 octavia_api_cfn_wsgi is running"
tags: validation
when:
- step|int == 0
- httpd_enabled.rc == 0
- httpd_running.rc == 0
shell: systemctl status 'httpd' | grep -q 'octavia'
- name: Stop octavia_api service (running under httpd)
when:
- step|int == 2
- httpd_enabled.rc == 0
- httpd_running.rc == 0
service: name=httpd state=stopped

View File

@ -125,8 +125,21 @@ outputs:
/var/log/containers/octavia and /var/log/containers/httpd/octavia-api.
ignore_errors: true
upgrade_tasks:
- name: Check if octavia_health_manager is deployed
common: systemctl is-enabled --quiet openstack-octavia-health-manager
tags: common
ignore_errors: True
register: octavia_health_enabled
- name: "PreUpgrade step0,validation: Check service openstack-octavia-health-manager is running"
command: systemctl is-active --quiet openstack-octavia-health-manager
tags: validation
when:
- step|int == 0
- octavia_health_enabled.rc == 0
- name: Stop and disable octavia_health_manager service
when: step|int == 2
when:
- step|int == 2
- octavia_health_enabled.rc == 0
service: name=openstack-octavia-health-manager state=stopped enabled=no
- name: Set fact for removal of openstack-octavia-health-manager package
when: step|int == 2

View File

@ -121,6 +121,19 @@ outputs:
/var/log/containers/octavia and /var/log/containers/httpd/octavia-api.
ignore_errors: true
upgrade_tasks:
- name: Check if octavia_housekeeping is deployed
common: systemctl is-enabled --quiet openstack-octavia-housekeeping
tags: common
ignore_errors: True
register: octavia_housekeeping_enabled
- name: "PreUpgrade step0,validation: Check service openstack-octavia-housekeeping is running"
command: systemctl is-active --quiet openstack-octavia-housekeeping
when:
- step|int == 0
- octavia_housekeeping_enabled.rc == 0
tags: validation
- name: Stop and disable octavia_housekeeping service
when: step|int == 2
when:
- step|int == 2
- octavia_housekeeping_enabled.rc == 0
service: name=openstack-octavia-housekeeping state=stopped enabled=no

View File

@ -144,6 +144,19 @@ outputs:
- openssl
when: {get_param: EnablePackageInstall}
upgrade_tasks:
- name: Check if octavia_worker is deployed
common: systemctl is-enabled --quiet openstack-octavia-worker
tags: common
ignore_errors: True
register: octavia_worker_enabled
- name: "PreUpgrade step0,validation: Check service openstack-octavia-worker is running"
command: systemctl is-active --quiet openstack-octavia-worker
when:
- step|int == 0
- octavia_worker_enabled.rc == 0
tags: validation
- name: Stop and disable octavia_worker service
when: step|int == 2
when:
- step|int == 2
- octavia_worker_enabled.rc == 0
service: name=openstack-octavia-worker state=stopped enabled=no