From e580e0204bbdc080007eab79e6317decd403635b Mon Sep 17 00:00:00 2001 From: "Kabanov, Dmitrii (dk370c)" Date: Thu, 20 Jun 2019 11:14:16 -0700 Subject: [PATCH] [Ceph] Update helm tests for ceph-provisioners The changes allow to provide more information in case of failure. Change-Id: Ie03cafac33ef9b2cf457e0d483d838170eadaef4 --- .../templates/bin/_helm-tests.sh.tpl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/ceph-provisioners/templates/bin/_helm-tests.sh.tpl b/ceph-provisioners/templates/bin/_helm-tests.sh.tpl index f0ade3e59..f3d296148 100644 --- a/ceph-provisioners/templates/bin/_helm-tests.sh.tpl +++ b/ceph-provisioners/templates/bin/_helm-tests.sh.tpl @@ -64,11 +64,16 @@ spec: EOF # waiting for pvc to get create - sleep 30 - if ! kubectl get pvc -n $pvc_namespace $pvc_name|grep Bound; then - echo "Storageclass is available but can't create PersistentVolumeClaim." - exit 1 - fi + end=$(($(date +%s) + 120)) + while ! kubectl get pvc -n $pvc_namespace $pvc_name|grep Bound; do + if [ "$(date +%s)" -gt $end ]; then + kubectl get pvc -n $pvc_namespace $pvc_name + kubectl get pv + echo "Storageclass is available but can't create PersistentVolumeClaim." + exit 1 + fi + sleep 10 + done tee <