From 88db9ffa70500804802877bb9713a8992e56646b Mon Sep 17 00:00:00 2001 From: Chris Ahl Date: Mon, 6 Jul 2020 08:36:21 -0400 Subject: [PATCH 1/6] change timer to be more accurate --- start.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/start.sh b/start.sh index 6efabea24..6036ab346 100755 --- a/start.sh +++ b/start.sh @@ -16,10 +16,10 @@ function waitForPod() { podName=$1 ignore=$2 running="$3" - printf "\n#####\nWait for ${podName} to reach running state (4min).\n" + printf "\n#####\nWait for ${podName} to reach running state (20 min).\n" while [ ${FOUND} -eq 1 ]; do - # Wait up to 4min, should only take about 20-30s - if [ $MINUTE -gt 240 ]; then + # Wait up to 20 min, should only take about 20-30s + if [ $MINUTE -gt 1200 ]; then echo "Timeout waiting for the ${podName}. Try cleaning up using the uninstall scripts before running again." echo "List of current pods:" oc -n ${TARGET_NAMESPACE} get pods @@ -39,8 +39,8 @@ function waitForPod() { operatorPod="Waiting" fi echo "* STATUS: $operatorPod" - sleep 3 - (( MINUTE = MINUTE + 3 )) + sleep 5 + (( MINUTE = MINUTE + 5 )) done } From ff34166667fdd53488acbc30a2f087262fbee763 Mon Sep 17 00:00:00 2001 From: Chris Ahl Date: Mon, 6 Jul 2020 08:44:12 -0400 Subject: [PATCH 2/6] change timer to be more accurate --- start.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/start.sh b/start.sh index 6036ab346..1cb3cc8b4 100755 --- a/start.sh +++ b/start.sh @@ -13,13 +13,16 @@ TOTAL_POD_COUNT=35 function waitForPod() { FOUND=1 MINUTE=0 + CURRENT_TIME=`date +%s` + EXPIRE_TIME=$(($CURRENT_TIME+600)) podName=$1 ignore=$2 running="$3" - printf "\n#####\nWait for ${podName} to reach running state (20 min).\n" + printf "\n#####\nWait for ${podName} to reach running state (10 min).\n" while [ ${FOUND} -eq 1 ]; do - # Wait up to 20 min, should only take about 20-30s - if [ $MINUTE -gt 1200 ]; then + CURRENT_TIME=`date +%s` + # Wait up to 10 min, should only take about 20-30s + if [ $CURRENT_TIME -lt $EXPIRE_TIME ]; then echo "Timeout waiting for the ${podName}. Try cleaning up using the uninstall scripts before running again." echo "List of current pods:" oc -n ${TARGET_NAMESPACE} get pods @@ -39,8 +42,7 @@ function waitForPod() { operatorPod="Waiting" fi echo "* STATUS: $operatorPod" - sleep 5 - (( MINUTE = MINUTE + 5 )) + sleep 10 done } @@ -148,7 +150,7 @@ fi # Set the custom registry repo, defaulted to quay.io/open-cluster-management, but accomodate custom config focused on quay.io/acm-d for donwstream tests CUSTOM_REGISTRY_REPO=${CUSTOM_REGISTRY_REPO:-"quay.io/open-cluster-management"} -# If the user sets the COMPOSITE_BUNDLE flag to "true", then set to the `acm` variants of variables, otherwise the multicluster-hub version. +# If the user sets the COMPOSITE_BUNDLE flag to "true", then set to the `acm` variants of variables, otherwise the multicluster-hub version. if [[ "$COMPOSITE_BUNDLE" == "true" ]]; then OPERATOR_DIRECTORY="acm-operator"; else OPERATOR_DIRECTORY="multicluster-hub-operator"; fi; if [[ "$COMPOSITE_BUNDLE" == "true" ]]; then CUSTOM_REGISTRY_IMAGE="acm-custom-registry"; else CUSTOM_REGISTRY_IMAGE="multicluster-hub-custom-registry"; fi; @@ -236,5 +238,3 @@ if [ "${OS}" == "darwin" ]; then else echo "Deploying, use \"watch oc -n ${TARGET_NAMESPACE} get pods\" to monitor progress. Expect around 35 pods" fi - - From 9555acf01b8cd52fea1d0edd1189ce3eccfdc983 Mon Sep 17 00:00:00 2001 From: Chris Ahl Date: Mon, 6 Jul 2020 09:12:02 -0400 Subject: [PATCH 3/6] change timer to be more accurate --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 8d7199e39..7534c8ee6 100755 --- a/start.sh +++ b/start.sh @@ -23,7 +23,7 @@ function waitForPod() { while [ ${FOUND} -eq 1 ]; do CURRENT_TIME=`date +%s` # Wait up to 10 min, should only take about 20-30s - if [ $CURRENT_TIME -lt $EXPIRE_TIME ]; then + if [ $CURRENT_TIME -gt $EXPIRE_TIME ]; then echo "Timeout waiting for the ${podName}. Try cleaning up using the uninstall scripts before running again." echo "List of current pods:" oc -n ${TARGET_NAMESPACE} get pods From f293fa48f64c6e6024a86c902dd1699cbc83d4f1 Mon Sep 17 00:00:00 2001 From: Chris Ahl Date: Mon, 6 Jul 2020 09:49:07 -0400 Subject: [PATCH 4/6] change timer to be more accurate --- start.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/start.sh b/start.sh index 7534c8ee6..948243ff6 100755 --- a/start.sh +++ b/start.sh @@ -15,11 +15,11 @@ function waitForPod() { FOUND=1 MINUTE=0 CURRENT_TIME=`date +%s` - EXPIRE_TIME=$(($CURRENT_TIME+600)) + EXPIRE_TIME=$(($CURRENT_TIME+300)) podName=$1 ignore=$2 running="$3" - printf "\n#####\nWait for ${podName} to reach running state (10 min).\n" + printf "\n#####\nWait for ${podName} to reach running state (5 min).\n" while [ ${FOUND} -eq 1 ]; do CURRENT_TIME=`date +%s` # Wait up to 10 min, should only take about 20-30s @@ -43,7 +43,7 @@ function waitForPod() { operatorPod="Waiting" fi echo "* STATUS: $operatorPod" - sleep 10 + sleep 5 done } From c89500ae83e348da8732a36f4eb4b9c69b69638c Mon Sep 17 00:00:00 2001 From: Chris Ahl Date: Tue, 7 Jul 2020 13:27:41 -0400 Subject: [PATCH 5/6] change timer to be more accurate --- start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.sh b/start.sh index 948243ff6..74f474bb1 100755 --- a/start.sh +++ b/start.sh @@ -22,7 +22,7 @@ function waitForPod() { printf "\n#####\nWait for ${podName} to reach running state (5 min).\n" while [ ${FOUND} -eq 1 ]; do CURRENT_TIME=`date +%s` - # Wait up to 10 min, should only take about 20-30s + # Wait up to 5 min, should only take about 20-30s if [ $CURRENT_TIME -gt $EXPIRE_TIME ]; then echo "Timeout waiting for the ${podName}. Try cleaning up using the uninstall scripts before running again." echo "List of current pods:" From d7aec6e05a58083634c8e4314b84faee1e639e43 Mon Sep 17 00:00:00 2001 From: Chris Ahl Date: Tue, 7 Jul 2020 14:36:22 -0400 Subject: [PATCH 6/6] merge from master --- start.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/start.sh b/start.sh index 7e2babda1..2953d502d 100755 --- a/start.sh +++ b/start.sh @@ -161,18 +161,6 @@ else echo "Snapshot doesn't contain a version number we recognize, looking for the 1.X release pod count of ${TOTAL_POD_COUNT} if wait is selected." fi -# Set the custom registry repo, defaulted to quay.io/open-cluster-management, but accomodate custom config focused on quay.io/acm-d for donwstream tests -CUSTOM_REGISTRY_REPO=${CUSTOM_REGISTRY_REPO:-"quay.io/open-cluster-management"} -# Default COMPOSITE_BUNDLE to true -COMPOSITE_BUNDLE=${COMPOSITE_BUNDLE:-"true"} - -# If the user sets the COMPOSITE_BUNDLE flag to "true", then set to the `acm` variants of variables, otherwise the multicluster-hub version. -if [[ "$COMPOSITE_BUNDLE" == "true" ]]; then OPERATOR_DIRECTORY="acm-operator"; else OPERATOR_DIRECTORY="multicluster-hub-operator"; fi; -if [[ "$COMPOSITE_BUNDLE" == "true" ]]; then CUSTOM_REGISTRY_IMAGE="acm-custom-registry"; else CUSTOM_REGISTRY_IMAGE="multicluster-hub-custom-registry"; fi; - -# Set the subscription channel, defaulted to snapshot-2.0 -if [[ "$COMPOSITE_BUNDLE" == "true" ]]; then SUBSCRIPTION_CHANNEL="release-2.0"; else SUBSCRIPTION_CHANNEL="snapshot-2.0"; fi; - printf "* Using: ${DEFAULT_SNAPSHOT}\n\n" echo "* Applying SNAPSHOT to multiclusterhub-operator subscription"