Skip to content

Commit

Permalink
fix wait vsp ds running
Browse files Browse the repository at this point in the history
Signed-off-by: Salvatore Daniele <[email protected]>
  • Loading branch information
SalDaniele committed Oct 16, 2024
1 parent a9feb16 commit da76a4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extraConfigDpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit da76a4a

Please sign in to comment.