Continue checking for request url if initially null
When using get-occ-config.sh during overcloud upgrades, the script could potentially be started before the stack has been upgraded. In that scenario, the script will return null for the request metadata url for the deployed-server resource since the stack has not yet been updated and it's still using the previous Heat signaling. This patch updates the script to just continue checking the resource metadata if the request url is null. Eventually, once the resource has been updated, the script will continue and properly populate the os-collect-config configuration. Change-Id: I9db54d8ad278715f42b768edf8f0fd21998b2098
This commit is contained in:
parent
64eb5a1944
commit
c9596b72a1
@ -79,7 +79,14 @@ for role in $OVERCLOUD_ROLES; do
|
||||
server_stack=$(openstack stack resource show $stack $server_resource_name -c physical_resource_id -f value)
|
||||
done
|
||||
|
||||
deployed_server_metadata_url=$(openstack stack resource metadata $server_stack deployed-server | jq -r '.["os-collect-config"].request.metadata_url')
|
||||
while true; do
|
||||
deployed_server_metadata_url=$(openstack stack resource metadata $server_stack deployed-server | jq -r '.["os-collect-config"].request.metadata_url')
|
||||
if [ "$deployed_server_metadata_url" = "null" ]; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
echo "======================"
|
||||
echo "$role$i os-collect-config.conf configuration:"
|
||||
|
Loading…
Reference in New Issue
Block a user