Browse Source

ffu: Introduce Glance fast-forward upgrade tasks

fast_forward_upgrade_tasks for Glance covering Ocata and Pike.
- Service status check
- Stop services when updating from Ocata to Pike
- Update glance packages
- Db sync

bp fast-forward-upgrades
Change-Id: I292bf2cbff38eb67b71321b4ca76454e07a0d370
changes/44/521544/23
Lee Yarwood 5 years ago committed by Marius Cornea
parent
commit
ec4f24e853
  1. 40
      docker/services/glance-api.yaml

40
docker/services/glance-api.yaml

@ -261,3 +261,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

Loading…
Cancel
Save