ffu: Introduce Cinder 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 cinder packages
- Db sync

Resolves: rhbz#1536010
Closes-Bug: #1744056
bp fast-forward-upgrades
Change-Id: I172c3a1868a8b7a94b282cbe5c2f6b323f7ca101
This commit is contained in:
Lee Yarwood 2017-11-17 09:59:30 +00:00 committed by Marius Cornea
parent 781094e79b
commit d2073a13a2
3 changed files with 54 additions and 0 deletions

View File

@ -242,3 +242,35 @@ outputs:
when:
- step|int == 2
- remove_httpd_package|bool
fast_forward_upgrade_tasks:
- name: Check is cinder_api is deployed
command: systemctl is-enabled --quiet openstack-cinder-api
ignore_errors: True
register: cinder_api_enabled
- name: Stop openstack-cinder-api
service: name=openstack-cinder-api state=stopped
when:
- step|int == 2
- release == 'ocata'
- cinder_api_enabled.rc == 0
- name: Extra migration for cinder
command: cinder-manage db online_data_migrations
when:
- step|int == 5
- release == 'pike'
- is_bootstrap_node|bool
- name: Cinder package update
command: yum update -y "{{ item }}"
with_items:
- puppet-cinder
- python2-cinderclient
- python-cinder
- openstack-cinder
when:
- step|int == 6
- is_bootstrap_node|bool
- name: Cinder db sync
command: cinder-manage db sync
when:
- step|int == 8
- is_bootstrap_node|bool

View File

@ -157,3 +157,14 @@ outputs:
when:
- step|int == 2
- remove_cinder_package|bool
fast_forward_upgrade_tasks:
- name: Check if cinder_scheduler is deployed
command: systemctl is-enabled --quiet openstack-cinder-scheduler
ignore_errors: True
register: cinder_scheduler_enabled
- name: Stop openstack-cinder-scheduler
service: name=openstack-cinder-scheduler state=stopped enabled=no
when:
- step|int == 2
- release == 'ocata'
- cinder_scheduler_enabled.rc == 0

View File

@ -222,3 +222,14 @@ outputs:
when:
- step|int == 2
- remove_cinder_package|bool
fast_forward_upgrade_tasks:
- name: Check if cinder_volume is deployed
command: systemctl is-enabled --quiet openstack-cinder-volume
ignore_errors: True
register: cinder_volume_enabled
- name: Stop openstack-cinder-volume
service: name=openstack-cinder-volume state=stopped enabled=no
when:
- step|int == 2
- release == 'ocata'
- cinder_volume_enabled.rc == 0