Merge "Ceph-Client: Wait for inactive pgs in ceph cluster"
This commit is contained in:
commit
4ed7bf33b3
@ -31,6 +31,16 @@ if [[ ! -e ${ADMIN_KEYRING} ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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 () {
|
function create_crushrule () {
|
||||||
CRUSH_NAME=$1
|
CRUSH_NAME=$1
|
||||||
CRUSH_RULE=$2
|
CRUSH_RULE=$2
|
||||||
@ -151,3 +161,5 @@ manage_pool {{ .application }} {{ .name }} {{ .replication }} {{ .percent_total_
|
|||||||
{{- if .Values.conf.pool.crush.tunables }}
|
{{- if .Values.conf.pool.crush.tunables }}
|
||||||
ceph --cluster "${CLUSTER}" osd crush tunables {{ .Values.conf.pool.crush.tunables }}
|
ceph --cluster "${CLUSTER}" osd crush tunables {{ .Values.conf.pool.crush.tunables }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
wait_for_inactive_pgs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user