[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
This commit is contained in:
Kabanov, Dmitrii 2020-09-10 11:05:42 -07:00 committed by Dmitrii Kabanov
parent c336d93530
commit 78137fd4ce

View File

@ -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