From c2abbdaeedc7ad19085af010c2175cf4c9657aa3 Mon Sep 17 00:00:00 2001 From: Grant Griffiths Date: Wed, 15 Apr 2020 20:04:51 -0700 Subject: [PATCH] Fix deploy-hostpath.sh hostpath pod and CRD conditional Signed-off-by: Grant Griffiths --- deploy/util/deploy-hostpath.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deploy/util/deploy-hostpath.sh b/deploy/util/deploy-hostpath.sh index 825e22702..9272a947b 100755 --- a/deploy/util/deploy-hostpath.sh +++ b/deploy/util/deploy-hostpath.sh @@ -203,11 +203,10 @@ done # snapshotter, resizer, socat and hostpath plugin in the default namespace. expected_running_pods=6 cnt=0 -while [ $(kubectl get pods 2>/dev/null | grep '^csi-hostpath.* Running ' | wc -l) -lt $expected_running_pods ] || ! kubectl describe volumesnapshotclasses.snapshot.storage.k8s.io 2>/dev/null >/dev/null; do +while [ $(kubectl get pods 2>/dev/null | grep '^csi-hostpath.* Running ' | wc -l) -lt ${expected_running_pods} ]; do if [ $cnt -gt 30 ]; then echo "$(kubectl get pods 2>/dev/null | grep '^csi-hostpath.* Running ' | wc -l) running pods:" kubectl describe pods - (set -x; kubectl describe volumesnapshotclasses.snapshot.storage.k8s.io) || true echo >&2 "ERROR: hostpath deployment not ready after over 5min" exit 1