From 934850895f34a4737375713db2cb283579444573 Mon Sep 17 00:00:00 2001 From: Lee Yarwood Date: Tue, 24 Oct 2017 09:39:59 +0100 Subject: [PATCH] ffu: Introduce Keystone fast-forward upgrade tasks fast_forward_upgrade_tasks for keystone covering Ocata and Pike. - Service status check - Stop service when updating from Ocata to Pike - Update keystone package - Db sync bp fast-forward-upgrades Change-Id: I65b0c562c6e2545e99e9511d7b148c2130cc6b25 --- docker/services/keystone.yaml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/docker/services/keystone.yaml b/docker/services/keystone.yaml index 0a417ffa67..ee19ba530d 100644 --- a/docker/services/keystone.yaml +++ b/docker/services/keystone.yaml @@ -227,3 +227,40 @@ outputs: state: absent metadata_settings: get_attr: [KeystoneBase, role_data, metadata_settings] + fast_forward_upgrade_tasks: + - name: Check for keystone running under apache + tags: common + shell: "httpd -t -D DUMP_VHOSTS | grep -q keystone_wsgi" + ignore_errors: true + register: httpd_enabled + - name: Check if httpd is running + ignore_errors: True + register: httpd_running + command: systemctl is-active --quiet httpd + - name: Stop and disable keystone (under httpd) + service: name=httpd state=stopped enabled=no + when: + - step|int == 2 + - release == 'ocata' + - httpd_enabled.rc == 0 + - httpd_running.rc == 0 + - name: Keystone package update + yum: + name: '{{ package }}' + state: latest + when: + - step|int == 6 + - is_bootstrap_node|bool + loop_control: + loop_var: package + with_items: + - openstack-keystone + - python2-keystoneclient + - python-keystone + - python2-keystonemiddleware + - python2-keystoneauth1 + - name: keystone db sync + command: keystone-manage db_sync + when: + - step|int == 8 + - is_bootstrap_node|bool