[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
This commit is contained in:
Stephen Taylor 2022-12-09 13:19:47 -07:00
parent d30bbfbfe7
commit 0aad6d05f0
4 changed files with 5 additions and 3 deletions

View File

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

View File

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

View File

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

View File

@ -83,6 +83,7 @@ conf:
tunables: ${CRUSH_TUNABLES}
target:
osd: 1
final_osd: 1
pg_per_osd: 100
default:
crush_rule: same_host