From da76a4a9b6178a210611418de7ddec07aabfdf0d Mon Sep 17 00:00:00 2001 From: Salvatore Daniele Date: Wed, 16 Oct 2024 13:22:30 -0400 Subject: [PATCH] fix wait vsp ds running Signed-off-by: Salvatore Daniele --- extraConfigDpu.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extraConfigDpu.py b/extraConfigDpu.py index a3eaa3b2..aa8d415f 100644 --- a/extraConfigDpu.py +++ b/extraConfigDpu.py @@ -137,15 +137,15 @@ def dpu_operator_start(client: K8sClient, repo: Optional[str]) -> None: def wait_vsp_ds_running(client: K8sClient) -> None: retries = 10 for _ in range(retries): - desired_result = client.oc_run_or_die("get ds vsp -o jsonpath='{.status.desiredNumberScheduled}'") - available_result = client.oc_run_or_die("get ds vsp -o jsonpath='{.status.numberAvailable}'") + time.sleep(20) + desired_result = client.oc_run_or_die("get ds vsp -n openshift-dpu-operator -o jsonpath='{.status.desiredNumberScheduled}'") + available_result = client.oc_run_or_die("get ds vsp -n openshift-dpu-operator -o jsonpath='{.status.numberAvailable}'") logger.info(f"Waiting for VSP ds to scale up. Desired/Available: {desired_result.out}/{available_result.out}") if desired_result.out.isdigit() and available_result.out.isdigit(): desired_pods = int(desired_result.out) available_pods = int(available_result.out) if available_pods == desired_pods: break - time.sleep(20) else: logger.error_and_exit("Vsp pods failed to reach ready state")