Skip to content

Commit be16edd

Browse files
authored
[patch] Increase wait delay as retries increase (#159)
1 parent 170ee26 commit be16edd

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/mas/devops/ocp.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,16 @@ def waitForPVC(dynClient: DynamicClient, namespace: str, pvcName: str) -> bool:
269269
retries = 0
270270
while not foundReadyPVC and retries < maxRetries:
271271
retries += 1
272+
# After 5 retries increase the delay to 1 minute
273+
# After 10 retries increase the delay to 2 minutes
274+
# After 15 retries increase the delay to 5 minutes
275+
if retries == 6:
276+
retryDelaySeconds = 60
277+
elif retries == 11:
278+
retryDelaySeconds = 120
279+
elif retries == 16:
280+
retryDelaySeconds = 300
281+
272282
try:
273283
pvc = pvcAPI.get(name=pvcName, namespace=namespace)
274284
if pvc.status.phase == "Bound":

0 commit comments

Comments
 (0)