From 1dcaffdf7043ddaca0511de4ec6aac214be4dca0 Mon Sep 17 00:00:00 2001 From: Stephen Taylor Date: Fri, 5 Feb 2021 08:52:59 -0700 Subject: [PATCH] [ceph-client] Don't wait for premerge PGs in the rbd pool job The wait_for_pgs() function in the rbd pool job waits for all PGs to become active before proceeding, but in the event of an upgrade that decreases pg_num values on one or more pools it sees PGs in the clean+premerge+peered state as peering and waits for "peering" to complete. Since these PGs are in the process of merging into active PGs, waiting for the merge to complete is unnecessary. This change will reduce the wait time in this job significantly in these cases. Change-Id: I9a2985855a25cdb98ef6fe011ba473587ea7a4c9 --- ceph-client/Chart.yaml | 2 +- ceph-client/templates/bin/pool/_init.sh.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ceph-client/Chart.yaml b/ceph-client/Chart.yaml index 4f7c696d3..a389f0831 100644 --- a/ceph-client/Chart.yaml +++ b/ceph-client/Chart.yaml @@ -15,6 +15,6 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Ceph Client name: ceph-client -version: 0.1.6 +version: 0.1.7 home: https://github.com/ceph/ceph-client ... diff --git a/ceph-client/templates/bin/pool/_init.sh.tpl b/ceph-client/templates/bin/pool/_init.sh.tpl index 0601d33cd..0c3c66d6b 100644 --- a/ceph-client/templates/bin/pool/_init.sh.tpl +++ b/ceph-client/templates/bin/pool/_init.sh.tpl @@ -33,7 +33,7 @@ function wait_for_pgs () { echo "#### Start: Checking pgs ####" pgs_ready=0 - query='map({state: .state}) | group_by(.state) | map({state: .[0].state, count: length}) | .[] | select(.state | contains("active") | not)' + query='map({state: .state}) | group_by(.state) | map({state: .[0].state, count: length}) | .[] | select(.state | contains("active") or contains("premerge") | not)' if [[ $(ceph mon versions | awk '/version/{print $3}' | cut -d. -f1) -ge 14 ]]; then query=".pg_stats | ${query}"