From c3f921c916bf1f5cd4a61373ef14c57327735580 Mon Sep 17 00:00:00 2001 From: Chinasubbareddy Mallavarapu Date: Fri, 16 Oct 2020 20:17:49 +0000 Subject: [PATCH] [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 --- ceph-client/Chart.yaml | 2 +- ceph-client/templates/bin/pool/_init.sh.tpl | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ceph-client/Chart.yaml b/ceph-client/Chart.yaml index 241149c19..eab8de70f 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 d0bba405e..73f004ae7 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.