Make Ceph pool init job consistent with helm test

The current pool init job only allows the finding of PGs in the
"peering" or "activating" (or active) states, but it should also
allow the other possible states that can occur while the PG
autoscaler is running ("unknown" and "creating" and "recover").
The helm test is already allowing these states, so the pool init
job is being changed to also allow them to be consistent.

Change-Id: Ib2c19a459c6a30988e3348f8d073413ed687f98b
This commit is contained in:
Parsons, Cliff (cp769u) 2021-05-11 15:31:03 +00:00
parent 6dd39da6ad
commit d4f253ef9f
3 changed files with 5 additions and 4 deletions

View File

@ -15,6 +15,6 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Ceph Client
name: ceph-client
version: 0.1.15
version: 0.1.16
home: https://github.com/ceph/ceph-client
...

View File

@ -42,9 +42,9 @@ 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("peer") or contains("activating") | not)' <<< "${pgs_state}") ]]; then
# If inactive PGs aren't peering, fail
echo "Failure, found inactive PGs that aren't peering"
if [[ $(jq -c '. | select(.state | contains("peer") or contains("activating") or contains("recover") or contains("unknown") or contains("creating") | not)' <<< "${pgs_state}") ]]; then
# If inactive PGs aren't in the allowed set of states above, fail
echo "Failure, found inactive PGs that aren't in the allowed set of states"
exit 1
fi
if [[ "${pgs_state}" ]]; then

View File

@ -16,4 +16,5 @@ ceph-client:
- 0.1.13 Fix ceph-client helm test
- 0.1.14 Allow Ceph RBD pool job to leave failed pods
- 0.1.15 Make ceph-client helm test more PG specific
- 0.1.16 Make Ceph pool init job consistent with helm test
...