Ceph-Client: Wait for inactive pgs in ceph cluster
This is to add wait logic for inactive pgs after adjusting pgs in manage pool job. Change-Id: I3353262644ae649ed9f495ac83a2567d9da263ae
This commit is contained in:
parent
3384d68c78
commit
b69f393b54
@ -31,6 +31,16 @@ if [[ ! -e ${ADMIN_KEYRING} ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function wait_for_inactive_pgs () {
|
||||
echo "#### Start: Checking for inactive pgs ####"
|
||||
|
||||
# Loop until all pgs are active
|
||||
while [[ `ceph --cluster ${CLUSTER} pg ls | tail -n +2 | grep -v "active+"` ]]
|
||||
do
|
||||
sleep 3
|
||||
done
|
||||
}
|
||||
|
||||
function create_crushrule () {
|
||||
CRUSH_NAME=$1
|
||||
CRUSH_RULE=$2
|
||||
@ -151,3 +161,5 @@ manage_pool {{ .application }} {{ .name }} {{ .replication }} {{ .percent_total_
|
||||
{{- if .Values.conf.pool.crush.tunables }}
|
||||
ceph --cluster "${CLUSTER}" osd crush tunables {{ .Values.conf.pool.crush.tunables }}
|
||||
{{- end }}
|
||||
|
||||
wait_for_inactive_pgs
|
||||
|
Loading…
Reference in New Issue
Block a user