diff options
author | James Slagle <jslagle@redhat.com> | 2017-04-27 13:00:17 -0400 |
---|---|---|
committer | James Slagle <jslagle@redhat.com> | 2017-05-23 11:42:29 +0000 |
commit | d8e27308c7296442106f4b4f2b615eaef17aad58 (patch) | |
tree | 9f48eb237be160669ca014821eac3ff49e50c0d8 /deployed-server | |
parent | 0137f67f2e27b08a23fea4f0c2efb8aea4a45c40 (diff) |
Add $STACK_NAME input var
The stack name can now be overridden in the get-occ-config.sh script for
deployed-server's by setting the $STACK_NAME variable in the
environment.
Change-Id: Iecba21499b80e463b4c629be53c309996d39472d
Closes-Bug: #1686719
(cherry picked from commit e17590c69e599a3eb6b4a18d2d6dbef9dede9ea8)
Diffstat (limited to 'deployed-server')
-rwxr-xr-x | deployed-server/scripts/get-occ-config.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/deployed-server/scripts/get-occ-config.sh b/deployed-server/scripts/get-occ-config.sh index d0cc4dff..d2bd03f9 100755 --- a/deployed-server/scripts/get-occ-config.sh +++ b/deployed-server/scripts/get-occ-config.sh @@ -12,6 +12,7 @@ CEPHSTORAGE_HOSTS=${CEPHSTORAGE_HOSTS:-""} SUBNODES_SSH_KEY=${SUBNODES_SSH_KEY:-"~/.ssh/id_rsa"} SSH_OPTIONS="-tt -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=Verbose -o PasswordAuthentication=no -o ConnectionAttempts=32" OVERCLOUD_ROLES=${OVERCLOUD_ROLES:-"Controller Compute BlockStorage ObjectStorage CephStorage"} +STACK_NAME=${STACK_NAME:-"overcloud"} # Set the _hosts vars for the default roles based on the old var names that # were all caps for backwards compatibility. @@ -53,14 +54,14 @@ function check_stack { for role in $OVERCLOUD_ROLES; do - while ! check_stack overcloud; do + while ! check_stack $STACK_NAME; do sleep $SLEEP_TIME done - rg_stack=$(openstack stack resource show overcloud $role -c physical_resource_id -f value) + rg_stack=$(openstack stack resource show $STACK_NAME $role -c physical_resource_id -f value) while ! check_stack $rg_stack; do sleep $SLEEP_TIME - rg_stack=$(openstack stack resource show overcloud $role -c physical_resource_id -f value) + rg_stack=$(openstack stack resource show $STACK_NAME $role -c physical_resource_id -f value) done stacks=$(openstack stack resource list $rg_stack -c resource_name -c physical_resource_id -f json | jq -r "sort_by(.resource_name) | .[] | .physical_resource_id") |