From e10a84138425217a323c8d32141ddc0d951bb61c Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Tue, 11 Mar 2025 15:55:09 -0500 Subject: [PATCH] [ceph-rook] Skip check iteration if TOOLS_POD empty When we deploy Ceph cluster using Rook we check its status in a loop using Rook tools pod. If tools pod is not found, let's skip the iteration. Change-Id: Ib6bc90034961f89b8bb53081db5bf03c4d736110 --- tools/deployment/ceph/ceph-rook.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/deployment/ceph/ceph-rook.sh b/tools/deployment/ceph/ceph-rook.sh index 63617eae5..1d949b014 100755 --- a/tools/deployment/ceph/ceph-rook.sh +++ b/tools/deployment/ceph/ceph-rook.sh @@ -389,10 +389,15 @@ RGW_POD=$(kubectl get pods \ while [[ -z "${RGW_POD}" ]] do sleep 10 + date +'%Y-%m-%d %H:%M:%S' TOOLS_POD=$(kubectl get pods \ --namespace=ceph \ --selector="app=rook-ceph-tools" \ --no-headers | grep Running | awk '{ print $1; exit }') + if [[ -z "${TOOLS_POD}" ]]; then + echo "No running rook-ceph-tools pod found. Waiting..." + continue + fi echo "=========== CEPH STATUS ============" kubectl exec -n ceph ${TOOLS_POD} -- ceph -s echo "=========== CEPH OSD POOL LIST ============" @@ -407,4 +412,8 @@ done helm osh wait-for-pods ceph #NOTE: Validate deploy +TOOLS_POD=$(kubectl get pods \ + --namespace=ceph \ + --selector="app=rook-ceph-tools" \ + --no-headers | grep Running | awk '{ print $1; exit }') kubectl exec -n ceph ${TOOLS_POD} -- ceph -s