Always set pg_num_min to the proper value
Currently if pg_num_min is less than the value specified in values.yaml or overrides no change to pg_num_min is made during updates when the value should be increased. This PS will ensure the proper value is always set. Change-Id: I79004506b66f2084402af59f9f41cda49a929794
This commit is contained in:
parent
a0aec27ebc
commit
43fe7246fd
@ -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
|
||||
...
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user