Merge "Always set pg_num_min to the proper value"

This commit is contained in:
Zuul 2021-08-31 15:09:38 +00:00 committed by Gerrit Code Review
commit 3b06925560
3 changed files with 7 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.21
version: 0.1.22
home: https://github.com/ceph/ceph-client
...

View File

@ -200,9 +200,12 @@ function create_pool () {
pg_num=$(jq '.pg_num' <<< "${pool_values}")
pg_num_min=$(jq '.pg_num_min' <<< "${pool_values}")
# set pg_num_min to PG_NUM_MIN before enabling autoscaler
if [[ ${pg_num_min} -gt ${PG_NUM_MIN} ]] || [[ ${pg_num} -gt ${PG_NUM_MIN} ]]; then
ceph --cluster "${CLUSTER}" osd pool set "${POOL_NAME}" pg_num_min ${PG_NUM_MIN}
if [[ ${pg_num} -lt ${PG_NUM_MIN} ]]; then
ceph --cluster "${CLUSTER}" osd pool set "${POOL_NAME}" pg_autoscale_mode off
ceph --cluster "${CLUSTER}" osd pool set "${POOL_NAME}" pg_num ${PG_NUM_MIN}
ceph --cluster "${CLUSTER}" osd pool set "${POOL_NAME}" pgp_num ${PG_NUM_MIN}
fi
ceph --cluster "${CLUSTER}" osd pool set "${POOL_NAME}" pg_num_min ${PG_NUM_MIN}
ceph --cluster "${CLUSTER}" osd pool set "${POOL_NAME}" pg_autoscale_mode on
else
ceph --cluster "${CLUSTER}" osd pool set "${POOL_NAME}" pg_autoscale_mode off

View File

@ -22,4 +22,5 @@ ceph-client:
- 0.1.19 Use full image ref for docker official images
- 0.1.20 Export crash dumps when Ceph daemons crash
- 0.1.21 Fix Ceph checkDNS script
- 0.1.22 Set pg_num_min in all cases
...