From 0aad6d05f0b33f33de74a811253f8ebc9509ff6d Mon Sep 17 00:00:00 2001 From: Stephen Taylor Date: Fri, 9 Dec 2022 13:19:47 -0700 Subject: [PATCH] [ceph-client] Correct check for too many OSDs in the pool job The target OSD count and the final target OSD count may differ in cases where a deployment may not include all of the hardware it is expected to include eventually. This change corrects the check for more OSDs running than expected to be based on the final OSD count rather than the intermediate one to avoid false failures when the intermediate target is exceeded and the final target is not. Change-Id: I03a13cfe3b9053b6abc5d961426e7a8e92743808 --- ceph-client/Chart.yaml | 2 +- ceph-client/templates/bin/pool/_init.sh.tpl | 4 ++-- releasenotes/notes/ceph-client.yaml | 1 + tools/deployment/osh-infra-logging/020-ceph.sh | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ceph-client/Chart.yaml b/ceph-client/Chart.yaml index 9dca721f5..b2a1abce8 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.38 +version: 0.1.39 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 4f2a648a9..d450b21b6 100644 --- a/ceph-client/templates/bin/pool/_init.sh.tpl +++ b/ceph-client/templates/bin/pool/_init.sh.tpl @@ -89,11 +89,11 @@ function check_osd_count() { num_in_osds=$(awk '/"num_in_osds"/{print $2}' <<< "$osd_stat" | cut -d, -f1) num_up_osds=$(awk '/"num_up_osds"/{print $2}' <<< "$osd_stat" | cut -d, -f1) - EXPECTED_OSDS={{.Values.conf.pool.target.osd}} + EXPECTED_OSDS={{.Values.conf.pool.target.final_osd}} REQUIRED_PERCENT_OF_OSDS={{.Values.conf.pool.target.required_percent_of_osds}} if [ ${num_up_osds} -gt ${EXPECTED_OSDS} ]; then - echo "The expected amount of OSDs (${EXPECTED_OSDS}) is less than available OSDs (${num_up_osds}). Please, correct the value (.Values.conf.pool.target.osd)." + echo "More running OSDs (${num_up_osds}) than expected (${EXPECTED_OSDS}). Please correct the expected value (.Values.conf.pool.target.final_osd)." exit 1 fi diff --git a/releasenotes/notes/ceph-client.yaml b/releasenotes/notes/ceph-client.yaml index cd2e3b1fe..08eab937b 100644 --- a/releasenotes/notes/ceph-client.yaml +++ b/releasenotes/notes/ceph-client.yaml @@ -39,4 +39,5 @@ ceph-client: - 0.1.36 Add the ability to run Ceph commands from values - 0.1.37 Added OCI registry authentication - 0.1.38 Make use of noautoscale with Pacific + - 0.1.39 Correct check for too many OSDs in the pool job ... diff --git a/tools/deployment/osh-infra-logging/020-ceph.sh b/tools/deployment/osh-infra-logging/020-ceph.sh index 6d782a166..54caca757 100755 --- a/tools/deployment/osh-infra-logging/020-ceph.sh +++ b/tools/deployment/osh-infra-logging/020-ceph.sh @@ -83,6 +83,7 @@ conf: tunables: ${CRUSH_TUNABLES} target: osd: 1 + final_osd: 1 pg_per_osd: 100 default: crush_rule: same_host