[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
This commit is contained in:
parent
c8e87da4ae
commit
e10a841384
@ -389,10 +389,15 @@ RGW_POD=$(kubectl get pods \
|
|||||||
while [[ -z "${RGW_POD}" ]]
|
while [[ -z "${RGW_POD}" ]]
|
||||||
do
|
do
|
||||||
sleep 10
|
sleep 10
|
||||||
|
date +'%Y-%m-%d %H:%M:%S'
|
||||||
TOOLS_POD=$(kubectl get pods \
|
TOOLS_POD=$(kubectl get pods \
|
||||||
--namespace=ceph \
|
--namespace=ceph \
|
||||||
--selector="app=rook-ceph-tools" \
|
--selector="app=rook-ceph-tools" \
|
||||||
--no-headers | grep Running | awk '{ print $1; exit }')
|
--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 ============"
|
echo "=========== CEPH STATUS ============"
|
||||||
kubectl exec -n ceph ${TOOLS_POD} -- ceph -s
|
kubectl exec -n ceph ${TOOLS_POD} -- ceph -s
|
||||||
echo "=========== CEPH OSD POOL LIST ============"
|
echo "=========== CEPH OSD POOL LIST ============"
|
||||||
@ -407,4 +412,8 @@ done
|
|||||||
helm osh wait-for-pods ceph
|
helm osh wait-for-pods ceph
|
||||||
|
|
||||||
#NOTE: Validate deploy
|
#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
|
kubectl exec -n ceph ${TOOLS_POD} -- ceph -s
|
||||||
|
Loading…
x
Reference in New Issue
Block a user