Bug Fix - set_env file

Tested the scripts in the Atlanta Lab and ran into issues
with 'max_shipyard_count' and 'shipyard_query_time' variables
as we will need to export them as environment variables as well.

This patch set is meant to correct the problem.

Change-Id: I0ae407adac3df6a0cbe027a70940ee65904a7854
This commit is contained in:
Anthony Lin 2018-02-05 17:56:22 +00:00
parent 030c84322c
commit 5ca2b349a2
2 changed files with 10 additions and 10 deletions

View File

@ -22,7 +22,7 @@ check_timeout_counter() {
# Check total elapsed time
# The default time out is set to 1.5 hr
if [[ $counter -ge $max_count ]]; then
if [[ $counter -ge $max_shipyard_count ]]; then
echo 'Worflow Execution Timed Out!'
break
fi
@ -109,8 +109,8 @@ run_action () {
echo -e "Dag Execution is in" ${GREEN}$action_lifecycle${NC} "state\n"
# Back off between each iteration
echo -e "Back Off for $query_time seconds...\n"
sleep $query_time
echo -e "Back Off for $shipyard_query_time seconds...\n"
sleep $shipyard_query_time
# Step counter and check the timeout counter
((counter++))

View File

@ -14,16 +14,16 @@
# limitations under the License.
# Define Variable
# Note that 'query_time' has a default value of 90 seconds
# Note that 'max_count' has a default value of 60 loops (based on
namespace="${namespace:-ucp}"
# Export Environment Variables
# Note that 'shipyard_query_time' has a default value of 90 seconds
# Note that 'max_shipyard_count' has a default value of 60 loops (based on
# 90 seconds back off per cycle, i.e. 60 * 90 = 5400 seconds = 1.5 hr)
# Note that user can use a different value for each of the variables by
# exporting the required environment variable prior to running the script
max_count=${max_count:-60}
namespace="${namespace:-ucp}"
query_time=${query_time:-90}
# Export Environment Variables
export max_shipyard_count=${max_shipyard_count:-60}
export shipyard_query_time=${shipyard_query_time:-90}
export OS_AUTH_URL="${OS_AUTH_URL:-http://keystone.${namespace}:80/v3}"
export OS_PASSWORD="${OS_PASSWORD:-password}"
export OS_PROJECT_DOMAIN_NAME="${OS_PROJECT_DOMAIN_NAME:-default}"