Skip to content

Commit a98f05b

Browse files
author
jmccormick2001
committed
add sleep loop after pgo show pvc delete pod for better results on slow responding systems
1 parent 4ad9268 commit a98f05b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

apiserver/pvcservice/pvcimpl.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,13 @@ func printPVCListing(clusterName, pvcName, PVCRoot string) ([]string, error) {
9090
return newlines, err
9191
}
9292
//sleep a bit for the pod to be deleted
93-
time.Sleep(2000 * time.Millisecond)
93+
for i := 0; i < 9; i++ {
94+
time.Sleep(2000 * time.Millisecond)
95+
_, found, err := kubeapi.GetPod(apiserver.Clientset, podName, apiserver.Namespace)
96+
if !found || err != nil {
97+
break
98+
}
99+
}
94100
}
95101

96102
pvcRoot := "/"

0 commit comments

Comments
 (0)