[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
This commit is contained in:
Jose Luis Franco Arza 2021-05-14 12:10:40 +02:00
parent ab5d866cbc
commit c1ee7ccddb
1 changed files with 7 additions and 1 deletions

View File

@ -774,7 +774,7 @@ outputs:
when: when:
- step|int == 1 - step|int == 1
- not ansible_check_mode|bool - not ansible_check_mode|bool
block: block: &keystone_generate_clouds
- name: Create /etc/openstack directory if it does not exist - name: Create /etc/openstack directory if it does not exist
become: true become: true
file: file:
@ -849,6 +849,12 @@ outputs:
metadata_settings: metadata_settings:
get_attr: [ApacheServiceBase, role_data, metadata_settings] get_attr: [ApacheServiceBase, role_data, metadata_settings]
post_upgrade_tasks: 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 - name: Run the keystone endpoint creation
when: when:
- step|int == 1 - step|int == 1