From d2a98c293ddeb0cb4dea663b478c3a71682e20c3 Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Mon, 3 Mar 2025 22:52:51 -0600 Subject: [PATCH] Update ceph-rook.sh script While we are waiting for Ceph cluster to be ready we check Ceph status in a loop using tools pod provided by Rook. We have to get this tools pod name every iteration within the loop because K8s can terminate the pod for some reason and this is expected behavior. Change-Id: Iabb98e94d7470fe996091bf77787637f3e8f4798 --- tools/deployment/ceph/ceph-rook.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/deployment/ceph/ceph-rook.sh b/tools/deployment/ceph/ceph-rook.sh index f2c18deab..63617eae5 100755 --- a/tools/deployment/ceph/ceph-rook.sh +++ b/tools/deployment/ceph/ceph-rook.sh @@ -364,11 +364,6 @@ EOF helm upgrade --install --create-namespace --namespace ceph rook-ceph-cluster --set operatorNamespace=rook-ceph rook-release/rook-ceph-cluster --version ${ROOK_RELEASE} -f /tmp/ceph.yaml -TOOLS_POD=$(kubectl get pods \ - --namespace=ceph \ - --selector="app=rook-ceph-tools" \ - --no-headers | awk '{ print $1; exit }') - helm osh wait-for-pods rook-ceph kubectl wait --namespace=ceph --for=condition=ready pod --selector=app=rook-ceph-tools --timeout=600s @@ -393,7 +388,11 @@ RGW_POD=$(kubectl get pods \ --no-headers | awk '{print $1; exit}') while [[ -z "${RGW_POD}" ]] do - sleep 5 + sleep 10 + TOOLS_POD=$(kubectl get pods \ + --namespace=ceph \ + --selector="app=rook-ceph-tools" \ + --no-headers | grep Running | awk '{ print $1; exit }') echo "=========== CEPH STATUS ============" kubectl exec -n ceph ${TOOLS_POD} -- ceph -s echo "=========== CEPH OSD POOL LIST ============"