[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
This commit is contained in:
Chinasubbareddy Mallavarapu 2020-10-16 20:17:49 +00:00
parent 3a2d0f83b4
commit c3f921c916
2 changed files with 6 additions and 6 deletions

View File

@ -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
...

View File

@ -181,13 +181,13 @@ 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}"
else
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
ceph --cluster "${CLUSTER}" osd pool set "${POOL_NAME}" pg_autoscale_mode off
fi
fi
#
# Make sure pool is not protected after creation AND expansion so we can manipulate its settings.
# Final protection settings are applied once parameters (size, pg) have been adjusted.