diff --git a/ceph-client/Chart.yaml b/ceph-client/Chart.yaml index 347b9bc523..0d77db3318 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.21 +version: 0.1.22 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 93183e0104..039fd5e271 100644 --- a/ceph-client/templates/bin/pool/_init.sh.tpl +++ b/ceph-client/templates/bin/pool/_init.sh.tpl @@ -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 diff --git a/releasenotes/notes/ceph-client.yaml b/releasenotes/notes/ceph-client.yaml index 0b81e8121c..3a6534f1e3 100644 --- a/releasenotes/notes/ceph-client.yaml +++ b/releasenotes/notes/ceph-client.yaml @@ -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 ...