From 78137fd4ceef48a4cd5e65eef4b3e4b70dd95c9c Mon Sep 17 00:00:00 2001 From: "Kabanov, Dmitrii" Date: Thu, 10 Sep 2020 11:05:42 -0700 Subject: [PATCH] [ceph-client] Update queries in wait_for_pgs function The PS updates queries in wait_for_pgs function (init pool script). The queries were updated to handle the cases when PGs have "activating" and "peered" statuses. Change-Id: Ie93797fcb72462f61bca3a007f6649ab46ef4f97 --- ceph-client/templates/bin/pool/_init.sh.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceph-client/templates/bin/pool/_init.sh.tpl b/ceph-client/templates/bin/pool/_init.sh.tpl index 00d96ab4e..ed34cdd8e 100644 --- a/ceph-client/templates/bin/pool/_init.sh.tpl +++ b/ceph-client/templates/bin/pool/_init.sh.tpl @@ -42,7 +42,7 @@ function wait_for_pgs () { # Loop until all pgs are active while [[ $pgs_ready -lt 3 ]]; do pgs_state=$(ceph --cluster ${CLUSTER} pg ls -f json | jq -c "${query}") - if [[ $(jq -c '. | select(.state | contains("peering") | not)' <<< "${pgs_state}") ]]; then + if [[ $(jq -c '. | select(.state | contains("peer") or contains("activating") | not)' <<< "${pgs_state}") ]]; then # If inactive PGs aren't peering, fail echo "Failure, found inactive PGs that aren't peering" exit 1