From c1ee7ccddb025dc7bb1c3214b5018ca714bae0e7 Mon Sep 17 00:00:00 2001 From: Jose Luis Franco Arza Date: Fri, 14 May 2021 12:10:40 +0200 Subject: [PATCH] [ffwd][train-only] Rebuild clouds.yaml before running keystone endpoint configuration. In [0] the rebuilding of Keystone endpoint configuration was added when running the FFWD workflow. However, it was not considered that the Undercloud upgrade only adds the content for the undercloud stack in clouds.yaml, being the Overcloud's stack information missing from the file. This provokes the task to fail while trying to create the Keystone endpoints, as no cloud matching the cloud's stack name is found. This patch anchors the block in charge of generating the clouds.yaml content during the external_deploy_tasks and calls it in the step 0 so that we ensure the file is ready when executing the post_upgrade task in step 1. [0] - Ic1e63ca773fb20f10f16fc3835f8f263cb3b6929 Change-Id: Ie014961438f7c255a4eb9907596e873645bfcd46 Resolves: rhbz#1960579 --- deployment/keystone/keystone-container-puppet.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deployment/keystone/keystone-container-puppet.yaml b/deployment/keystone/keystone-container-puppet.yaml index 030e21de63..5a4fa831a8 100644 --- a/deployment/keystone/keystone-container-puppet.yaml +++ b/deployment/keystone/keystone-container-puppet.yaml @@ -774,7 +774,7 @@ outputs: when: - step|int == 1 - not ansible_check_mode|bool - block: + block: &keystone_generate_clouds - name: Create /etc/openstack directory if it does not exist become: true file: @@ -849,6 +849,12 @@ outputs: metadata_settings: get_attr: [ApacheServiceBase, role_data, metadata_settings] post_upgrade_tasks: + - name: Rebuild clouds.yaml content + when: + - step|int == 0 + - keystone_short_bootstrap_node_name|lower == ansible_facts['hostname']|lower + delegate_to: undercloud + block: *keystone_generate_clouds - name: Run the keystone endpoint creation when: - step|int == 1