Update the IP for Nexus SNI issue
[releng/builder.git] / jjb / opendaylight-infra-stack.sh
index 54f65e137cd66db04505c05df69cfba05b53bf32..157b7435f3a454e64a114855be0e7c9dbfd7ea5e 100644 (file)
@@ -22,8 +22,8 @@ cd /builder/openstack-hot || exit 1
 JOB_SUM=$(echo "$JOB_NAME" | sum | awk '{{ print $1 }}')
 VM_NAME="$JOB_SUM-$BUILD_NUMBER"
 
-OS_TIMEOUT=10  # Minutes to wait for OpenStack VM to come online
-STACK_RETRIES=3  # Number of times to retry creating a stack before fully giving up
+OS_TIMEOUT=15  # Minutes to wait for OpenStack VM to come online
+STACK_RETRIES=2  # Number of times to retry creating a stack before fully giving up
 STACK_SUCCESSFUL=false
 # seq X refers to waiting for X minutes for OpenStack to return
 # a status that is not CREATE_IN_PROGRESS before giving up.
@@ -58,15 +58,7 @@ for try in $(seq $STACK_RETRIES); do
                     echo "$j: $STACK_SHOW"
                     if [[ $STACK_SHOW == *"DELETE_FAILED"* ]]; then
                         echo "stack delete failed. trying to stack abandon now"
-                        # stack abandon does not work on RS, therefore requires acquiring a token
-                        # and using http delete method to abondon DELETE_FAILED stacks
-                        # Todo: remove the change once RS fixes the issue upstream
-                        # openstack stack abandon "$STACK_NAME"
-                        STACK_ID=$(openstack stack show -f json -c "id" "$STACK_NAME" | jq -r '."id"')
-                        TOKEN=$(openstack token issue -f json -c id | jq -r '.id')
-                        curl -si -X DELETE -H "Content-Type: application/json" -H "Accept: application/json"\
-                            -H "x-auth-token: $TOKEN"\
-                            "https://dfw.orchestration.api.rackspacecloud.com/v1/904885/stacks/$STACK_NAME/$STACK_ID/abandon"
+                        openstack stack abandon "$STACK_NAME"
                         STACK_SHOW=$(openstack stack show "$STACK_NAME")
                         echo "$STACK_SHOW"
                     fi