Change
fe2beb15bc9effb5b91ba17b520ab6c167dd6604 introduced a bug where
the CLOUD_CREDENTIAL_ID was being used for the OS_CLOUD export variable.
This was done since the test for multi-cloud image validation had the
credential IDs matching the OS_CLOUD variable. However, most of our
systems have the CLOUD_CREDENTIAL_ID set to the default of 'os-cloud'
and therefore after pulling updating to a global-jjb with that change
would no longer be able to validate images!
We now look for an OS_CLOUD variable in the cloud.cfg file and use it if
it is set, otherwise we default to an OS_CLOUD of 'vex' as we previously
did before change
fe2beb15bc9effb5b91ba17b520ab6c167dd6604
Change-Id: I0af763495fa3a7ce2e8c080324abaf5d384e5188
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
--- /dev/null
+---
+fixes:
+ - |
+ Change multi-cloud image validation to look for an OS_CLOUD variable in the
+ cloud.cfg instead of overloading CLOUD_CREDENTIAL_ID as that variable
+ does not usually point to an ID that is in the openstack clouds.yaml file.
# Verify that we have a cloud config file
if [ -f "$cloud/cloud.cfg" ]; then
# Get the OS_CLOUD variable from cloud config and export it
- OS_CLOUD=$(grep ^CLOUD_CREDENTIAL_ID= "$cloud/cloud.cfg" | cut -d'=' -f2)
+ os_cloud=$(grep ^OS_CLOUD= "$cloud/cloud.cfg" | cut -d'=' -f2)
+ OS_CLOUD="${os_cloud:-vex}"
export OS_CLOUD
verify_images "$cloud"