Stop the object-expirer service before removing swift-proxy

As discussed in the bug below, the expirer service is provided
by the swift-proxy package so it needs to be stopped at the
same time as swift-proxy and not with the other swift services

Change-Id: I01518f82cef494682b4359ba7849ba7e37ac39cc
Related-Bug: 1701501
This commit is contained in:
marios 2017-11-21 17:37:48 +02:00
parent e7e0dd17da
commit b3d1d45ba5
2 changed files with 14 additions and 10 deletions

View File

@ -147,19 +147,24 @@ outputs:
dest: /var/log/containers/swift
state: link
upgrade_tasks:
- name: Check if swift_proxy is deployed
command: systemctl is-enabled --quiet openstack-swift-proxy
- name: Check if swift-proxy or swift-object-expirer are deployed
command: systemctl is-enabled --quiet "{{ item }}"
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
register: swift_proxy_services_enabled
with_items:
- openstack-swift-proxy
- openstack-swift-object-expirer
- name: "PreUpgrade step0,validation: Check service openstack-swift-proxy and openstack-swift-object-expirer are running"
command: systemctl is-active --quiet "{{ item.item }}"
when: item.rc == 0
tags: step0,validation
- name: Stop and disable swift_proxy service
with_items: "{{ swift_proxy_services_enabled.results }}"
- name: Stop and disable swift-proxy and swift-object-expirer services
tags: step2
when: swift_proxy_enabled.rc == 0
service: name=openstack-swift-proxy state=stopped enabled=no
when: item.rc == 0
service: name={{ item.item }} state=stopped enabled=no
with_items: "{{ swift_proxy_services_enabled.results }}"
- name: Remove openstack-swift-proxy package if operator requests it
yum: name=openstack-swift-proxy state=removed
tags: step2

View File

@ -481,7 +481,6 @@ outputs:
- openstack-swift-container-updater
- openstack-swift-container
- openstack-swift-object-auditor
- openstack-swift-object-expirer
- openstack-swift-object-replicator
- openstack-swift-object-updater
- openstack-swift-object