FFU: Fix swift FFU tasks

We need to set fact instead of registering values and we shouldn't
update packages if we don't run any DB migrations.

Change-Id: I2e508b06064f66ae640ae0c8694dbe290ef42846
This commit is contained in:
Lukas Bezdicka 2018-02-26 16:03:23 +01:00 committed by Athlan-Guyot sofer
parent bebda4036b
commit 503762d011
2 changed files with 22 additions and 13 deletions

@ -277,15 +277,24 @@ outputs:
fast_forward_upgrade_tasks:
- name: Check if swift-proxy or swift-object-expirer are deployed
command: systemctl is-enabled --quiet "{{ item }}"
register: swift_proxy_services_enabled
with_items:
- openstack-swift-proxy
- openstack-swift-object-expirer
ignore_errors: True
register: swift_proxy_services_enabled_result
when:
- step|int == 0
- release == 'ocata'
- name: Set fact swift_proxy_services_enabled
when:
- step|int == 0
- release == 'ocata'
set_fact:
swift_proxy_services_enabled: "{{ swift_proxy_services_enabled_result }}"
- name: Stop swift-proxy and swift-object-expirer services
service: name={{ item.item }} state=stopped enabled=no
with_items: "{{ swift_proxy_services_enabled.results }}"
when:
- step|int == 2
- step|int == 1
- release == 'ocata'
- item.rc == 0

@ -541,7 +541,6 @@ outputs:
fast_forward_upgrade_tasks:
- name: Check if swift storage services are deployed
command: systemctl is-enabled --quiet "{{ item }}"
register: swift_services_enabled
with_items:
- openstack-swift-account-auditor
- openstack-swift-account-reaper
@ -556,19 +555,20 @@ outputs:
- openstack-swift-object-updater
- openstack-swift-object
ignore_errors: True
register: swift_services_enabled_result
when:
- step|int == 0
- release == 'ocata'
- name: Set fact swift_services_enabled
set_fact:
swift_services_enabled: "{{ swift_services_enabled_result }}"
when:
- step|int == 0
- release == 'ocata'
- name: Stop swift storage services
service: name={{ item.item }} state=stopped enabled=no
with_items: "{{ swift_services_enabled.results }}"
when:
- step|int == 2
- step|int == 1
- release == 'ocata'
- item.rc == 0
- name: Update swift storage services
yum: name={{ item }} state=latest
with_items:
- openstack-swift-container
- openstack-swift-object
- openstack-swift-account
when:
- step|int == 6
- is_bootstrap_node|bool