Merge "ffu: Introduce Glance fast-forward upgrade tasks"

This commit is contained in:
Zuul 2018-02-21 19:35:12 +00:00 committed by Gerrit Code Review
commit c96b58c028
1 changed files with 40 additions and 0 deletions

View File

@ -271,3 +271,43 @@ outputs:
- remove_glance_package|bool
metadata_settings:
get_attr: [GlanceApiPuppetBase, role_data, metadata_settings]
fast_forward_upgrade_tasks:
- name: Check if glance_api is deployed
command: systemctl is-enabled --quiet openstack-glance-api
ignore_errors: True
register: glance_api_enabled
- name: Check if glance_registry is deployed
command: systemctl is-enabled --quiet openstack-glance-registry
ignore_errors: True
register: glance_registry_enabled
- name: Stop openstack-glance-api
service: name=openstack-glance-api state=stopped enabled=no
when:
- step|int == 2
- release == 'ocata'
- glance_api_enabled.rc == 0
- name: Stop openstack-glance-registry
service: name=openstack-glance-registry state=stopped enabled=no
when:
- step|int == 2
- release == 'ocata'
- glance_registry_enabled.rc == 0
- name: glance package update
yum:
name: '{{ package }}'
state: latest
when:
- step|int == 6
- is_bootstrap_node|bool
loop_control:
loop_var: package
with_items:
- python-glance-store
- python-glanceclient
- openstack-glance
- python-glance
- name: glance db sync
command: glance-manage db_sync
when:
- step|int == 8
- is_bootstrap_node|bool