Skip to content

Commit c1d3af5

Browse files
committed
[patch] Increase wait delay as retries increase
1 parent 170ee26 commit c1d3af5

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 == 5:
276+
retryDelaySeconds = 60
277+
elif retries == 10:
278+
retryDelaySeconds = 120
279+
elif retries == 15:
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)