[ceph-osd] wait for only osd pods from post apply job
This is to wait only for osd pods during ceph-osd chart install/upgrade process. Change-Id: I99bc7c1548f7b13c93059ac832b9f0589b049fc7
This commit is contained in:
parent
1532958c80
commit
67c905cae8
@ -15,6 +15,6 @@ apiVersion: v1
|
|||||||
appVersion: v1.0.0
|
appVersion: v1.0.0
|
||||||
description: OpenStack-Helm Ceph OSD
|
description: OpenStack-Helm Ceph OSD
|
||||||
name: ceph-osd
|
name: ceph-osd
|
||||||
version: 0.1.1
|
version: 0.1.2
|
||||||
home: https://github.com/ceph/ceph
|
home: https://github.com/ceph/ceph
|
||||||
...
|
...
|
||||||
|
@ -48,7 +48,7 @@ function wait_for_pods() {
|
|||||||
min_osds="add | if .true >= (.false + .true)*${REQUIRED_PERCENT_OF_OSDS}/100 \
|
min_osds="add | if .true >= (.false + .true)*${REQUIRED_PERCENT_OF_OSDS}/100 \
|
||||||
then \"pass\" else \"fail\" end"
|
then \"pass\" else \"fail\" end"
|
||||||
while true; do
|
while true; do
|
||||||
unhealthy_pods=$(kubectl get pods --namespace="${1}" -o json | jq -c "${query}")
|
unhealthy_pods=$(kubectl get pods --namespace="${1}" -o json -l component=osd| jq -c "${query}")
|
||||||
if [[ -z "${unhealthy_pods}" ]]; then
|
if [[ -z "${unhealthy_pods}" ]]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
@ -56,7 +56,7 @@ function wait_for_pods() {
|
|||||||
|
|
||||||
if [ $(date -u +%s) -gt $end ] ; then
|
if [ $(date -u +%s) -gt $end ] ; then
|
||||||
echo -e "Containers failed to start after $timeout seconds\n"
|
echo -e "Containers failed to start after $timeout seconds\n"
|
||||||
kubectl get pods --namespace "${1}" -o wide
|
kubectl get pods --namespace "${1}" -o wide -l component=osd
|
||||||
# Leaving while loop if minimum amount of OSDs are ready.
|
# Leaving while loop if minimum amount of OSDs are ready.
|
||||||
# It allows to proceed even if some OSDs are not ready
|
# It allows to proceed even if some OSDs are not ready
|
||||||
# or in "CrashLoopBackOff" state
|
# or in "CrashLoopBackOff" state
|
||||||
|
Loading…
Reference in New Issue
Block a user