commit c3f921c916bf1f5cd4a61373ef14c57327735580 Author: Chinasubbareddy Mallavarapu Date: Fri Oct 16 20:17:49 2020 +0000 [ceph-client] fix the logic to disable the autoscaler on pools This is to fix the logic to disable the autosclaer on pools as its not considering newly created pools. Change-Id: I76fe106918d865b6443453b13e3a4bd6fc35206a diff --git a/ceph-client/Chart.yaml b/ceph-client/Chart.yaml index 241149c..eab8de7 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.1 +version: 0.1.2 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 d0bba40..73f004a 100644 --- a/ceph-client/templates/bin/pool/_init.sh.tpl +++ b/ceph-client/templates/bin/pool/_init.sh.tpl @@ -181,12 +181,12 @@ function create_pool () { ceph --cluster "${CLUSTER}" osd pool create "${POOL_NAME}" ${POOL_PLACEMENT_GROUPS} while [ $(ceph --cluster "${CLUSTER}" -s | grep creating -c) -gt 0 ]; do echo -n .;sleep 1; done ceph --cluster "${CLUSTER}" osd pool application enable "${POOL_NAME}" "${POOL_APPLICATION}" + fi + + if [[ -z "$(ceph osd versions | grep ceph\ version | grep -v nautilus)" ]] && [[ "${ENABLE_AUTOSCALER}" == "true" ]] ; then + ceph --cluster "${CLUSTER}" osd pool set "${POOL_NAME}" pg_autoscale_mode on else - if [[ -z "$(ceph osd versions | grep ceph\ version | grep -v nautilus)" ]] && [[ "${ENABLE_AUTOSCALER}" == "true" ]] ; then - 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 - fi + ceph --cluster "${CLUSTER}" osd pool set "${POOL_NAME}" pg_autoscale_mode off fi # # Make sure pool is not protected after creation AND expansion so we can manipulate its settings.