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:
parent
030c84322c
commit
5ca2b349a2
@ -22,7 +22,7 @@ check_timeout_counter() {
|
|||||||
|
|
||||||
# Check total elapsed time
|
# Check total elapsed time
|
||||||
# The default time out is set to 1.5 hr
|
# 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!'
|
echo 'Worflow Execution Timed Out!'
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@ -109,8 +109,8 @@ run_action () {
|
|||||||
echo -e "Dag Execution is in" ${GREEN}$action_lifecycle${NC} "state\n"
|
echo -e "Dag Execution is in" ${GREEN}$action_lifecycle${NC} "state\n"
|
||||||
|
|
||||||
# Back off between each iteration
|
# Back off between each iteration
|
||||||
echo -e "Back Off for $query_time seconds...\n"
|
echo -e "Back Off for $shipyard_query_time seconds...\n"
|
||||||
sleep $query_time
|
sleep $shipyard_query_time
|
||||||
|
|
||||||
# Step counter and check the timeout counter
|
# Step counter and check the timeout counter
|
||||||
((counter++))
|
((counter++))
|
||||||
|
@ -14,16 +14,16 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# Define Variable
|
# Define Variable
|
||||||
# Note that 'query_time' has a default value of 90 seconds
|
namespace="${namespace:-ucp}"
|
||||||
# Note that 'max_count' has a default value of 60 loops (based on
|
|
||||||
|
# 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)
|
# 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
|
# Note that user can use a different value for each of the variables by
|
||||||
# exporting the required environment variable prior to running the script
|
# exporting the required environment variable prior to running the script
|
||||||
max_count=${max_count:-60}
|
export max_shipyard_count=${max_shipyard_count:-60}
|
||||||
namespace="${namespace:-ucp}"
|
export shipyard_query_time=${shipyard_query_time:-90}
|
||||||
query_time=${query_time:-90}
|
|
||||||
|
|
||||||
# Export Environment Variables
|
|
||||||
export OS_AUTH_URL="${OS_AUTH_URL:-http://keystone.${namespace}:80/v3}"
|
export OS_AUTH_URL="${OS_AUTH_URL:-http://keystone.${namespace}:80/v3}"
|
||||||
export OS_PASSWORD="${OS_PASSWORD:-password}"
|
export OS_PASSWORD="${OS_PASSWORD:-password}"
|
||||||
export OS_PROJECT_DOMAIN_NAME="${OS_PROJECT_DOMAIN_NAME:-default}"
|
export OS_PROJECT_DOMAIN_NAME="${OS_PROJECT_DOMAIN_NAME:-default}"
|
||||||
|
Loading…
Reference in New Issue
Block a user