You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/01/15 02:51:35 UTC

[incubator-openwhisk-deploy-kube] Diff for: [GitHub] csantanapr merged pull request #413: retry failed installation of routemgmt package/actions

diff --git a/helm/openwhisk/configMapFiles/installPackages/myTask.sh b/helm/openwhisk/configMapFiles/installPackages/myTask.sh
index 28184ff..90cd1f7 100644
--- a/helm/openwhisk/configMapFiles/installPackages/myTask.sh
+++ b/helm/openwhisk/configMapFiles/installPackages/myTask.sh
@@ -34,10 +34,23 @@ else
 fi
 
 pushd $OPENWHISK_HOME/ansible/roles/routemgmt/files
-    ./installRouteMgmt.sh $WHISK_AUTH $WHISK_API_HOST $WHISK_SYSTEM_NAMESPACE /usr/local/bin/wsk
+    # This operation is unreliable in a TravisCI environment (for unknown reasons),
+    # so try multiple times before giving up.
+    PASSED=false
+    TRIES=0
+    until $PASSED || [ $TRIES -eq 10 ]; do
+        if ./installRouteMgmt.sh $WHISK_AUTH $WHISK_API_HOST $WHISK_SYSTEM_NAMESPACE /usr/local/bin/wsk; then
+            PASSED=true
+            echo "Successfully deployed routemgmt package"
+        else
+            echo "Failed to deploy routemgmt package; will pause, uninstall, and try again"
+            let TRIES=TRIES+1
+            sleep 10
+            ./uninstallRouteMgmt.sh
+        fi
+    done
 popd
 
-
 #####
 # Install the OpenWhisk Catalog
 #####


With regards,
Apache Git Services