aboutsummaryrefslogtreecommitdiffstats
path: root/deployed-server
diff options
context:
space:
mode:
authorJames Slagle <jslagle@redhat.com>2017-01-08 16:21:51 -0500
committerJames Slagle <jslagle@redhat.com>2017-01-08 18:40:50 -0500
commitc9596b72a1efd9733361081029f2dc0e194d0b6d (patch)
treed17534a0d977d8e6a65a9aa2688d2ac15be512b2 /deployed-server
parent64eb5a1944332301900df1dc4fc2d226336d1bca (diff)
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
Diffstat (limited to 'deployed-server')
-rwxr-xr-xdeployed-server/scripts/get-occ-config.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/deployed-server/scripts/get-occ-config.sh b/deployed-server/scripts/get-occ-config.sh
index 404244b1..6c196f97 100755
--- a/deployed-server/scripts/get-occ-config.sh
+++ b/deployed-server/scripts/get-occ-config.sh
@@ -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:"