From e7d86497fe58f8af328c5de38298df60a50f8e42 Mon Sep 17 00:00:00 2001 From: David Parker Date: Fri, 19 Dec 2025 11:47:34 +0000 Subject: [PATCH] [patch] Increase timeout for pvc bind wait --- src/mas/devops/ocp.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/mas/devops/ocp.py b/src/mas/devops/ocp.py index 4219c5cc..cbfc93fb 100644 --- a/src/mas/devops/ocp.py +++ b/src/mas/devops/ocp.py @@ -259,8 +259,12 @@ def listInstances(dynClient: DynamicClient, apiVersion: str, kind: str) -> list: def waitForPVC(dynClient: DynamicClient, namespace: str, pvcName: str) -> bool: + """ + We will allow up to 10 minutes for a PVC to report a successful binding + """ pvcAPI = dynClient.resources.get(api_version="v1", kind="PersistentVolumeClaim") - maxRetries = 60 + maxRetries = 20 + retryDelaySeconds = 30 foundReadyPVC = False retries = 0 while not foundReadyPVC and retries < maxRetries: @@ -270,11 +274,11 @@ def waitForPVC(dynClient: DynamicClient, namespace: str, pvcName: str) -> bool: if pvc.status.phase == "Bound": foundReadyPVC = True else: - logger.debug(f"Waiting 5s for PVC {pvcName} to be ready before checking again ...") - sleep(5) + logger.debug(f"Waiting {retryDelaySeconds}s for PVC {pvcName} to be bound before checking again ...") + sleep(retryDelaySeconds) except NotFoundError: - logger.debug(f"Waiting 5s for PVC {pvcName} to be created before checking again ...") - sleep(5) + logger.debug(f"Waiting {retryDelaySeconds}s for PVC {pvcName} to be created before checking again ...") + sleep(retryDelaySeconds) return foundReadyPVC