Merge "Add validation task in docker services [Swift]" into stable/pike

This commit is contained in:
Zuul 2017-11-21 21:16:30 +00:00 committed by Gerrit Code Review
commit 513ce5cf96
2 changed files with 23 additions and 3 deletions

View File

@ -148,6 +148,15 @@ outputs:
- /var/log/containers/httpd/swift-proxy
- /srv/node
upgrade_tasks:
- name: Check if swift_proxy is deployed
command: systemctl is-enabled --quiet openstack-swift-proxy
tags: common
ignore_errors: True
register: swift_proxy_enabled
- name: "PreUpgrade step0,validation: Check service openstack-swift-proxy is running"
command: systemctl is-active --quiet openstack-swift-proxy
when: swift_proxy_enabled.rc == 0
tags: step0,validation
- name: Stop and disable swift_proxy service
tags: step2
service: name=openstack-swift-proxy state=stopped enabled=no

View File

@ -467,9 +467,11 @@ outputs:
for_each:
DEVICE: {get_param: SwiftRawDisks}
upgrade_tasks:
- name: Stop and disable swift storage services
tags: step2
service: name={{ item }} state=stopped enabled=no
- name: Check if swift storage services are deployed
command: systemctl is-enabled --quiet "{{ item }}"
tags: common
register: swift_services_enabled
ignore_errors: true
with_items:
- openstack-swift-account-auditor
- openstack-swift-account-reaper
@ -484,6 +486,15 @@ outputs:
- openstack-swift-object-replicator
- openstack-swift-object-updater
- openstack-swift-object
- name: "PreUpgrade step0,validation: Check swift storage services are running"
command: systemctl is-active --quiet "{{ item.item }}"
tags: step0,validation
with_items: "{{ swift_services_enabled.results }}"
when: item.rc == 0
- name: Stop and disable swift storage services
tags: step2
service: name={{ item.item }} state=stopped enabled=no
with_items: "{{ swift_services_enabled.results }}"
- name: Remove openstack-swift-container,object,account packages if operator requests it
yum: name={{ item }} state=removed
tags: step2