[ceph-client] Make use of noautoscale with Pacific
The Ceph Pacific release has added a noautoscale flag to enable and disable the PG autoscaler for all pools globally. This change utilizes this flag for enabling and disabling autoscaler when the Ceph major version is greater than or equal to 16. Change-Id: Iaa3f2d238850eb413f26b82d75b5f6835980877f
This commit is contained in:
parent
ed7e58f4b1
commit
6852f7c8ed
@ -15,6 +15,6 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Ceph Client
|
||||
name: ceph-client
|
||||
version: 0.1.37
|
||||
version: 0.1.38
|
||||
home: https://github.com/ceph/ceph-client
|
||||
...
|
||||
|
@ -161,17 +161,31 @@ function reweight_osds () {
|
||||
}
|
||||
|
||||
function enable_autoscaling () {
|
||||
if [[ $(ceph mgr versions | awk '/version/{print $3}' | cut -d. -f1) -eq 14 ]]; then
|
||||
ceph mgr module enable pg_autoscaler # only required for nautilus
|
||||
CEPH_MAJOR_VERSION=$(ceph mgr versions | awk '/version/{print $3}' | cut -d. -f1)
|
||||
|
||||
if [[ ${CEPH_MAJOR_VERSION} -ge 16 ]]; then
|
||||
# Pacific introduced the noautoscale flag to make this simpler
|
||||
ceph osd pool unset noautoscale
|
||||
else
|
||||
if [[ ${CEPH_MAJOR_VERSION} -eq 14 ]]; then
|
||||
ceph mgr module enable pg_autoscaler # only required for nautilus
|
||||
fi
|
||||
ceph config set global osd_pool_default_pg_autoscale_mode on
|
||||
fi
|
||||
ceph config set global osd_pool_default_pg_autoscale_mode on
|
||||
}
|
||||
|
||||
function disable_autoscaling () {
|
||||
if [[ $(ceph mgr versions | awk '/version/{print $3}' | cut -d. -f1) -eq 14 ]]; then
|
||||
ceph mgr module disable pg_autoscaler # only required for nautilus
|
||||
CEPH_MAJOR_VERSION=$(ceph mgr versions | awk '/version/{print $3}' | cut -d. -f1)
|
||||
|
||||
if [[ ${CEPH_MAJOR_VERSION} -ge 16 ]]; then
|
||||
# Pacific introduced the noautoscale flag to make this simpler
|
||||
ceph osd pool set noautoscale
|
||||
else
|
||||
if [[ ${CEPH_MAJOR_VERSION} -eq 14 ]]; then
|
||||
ceph mgr module disable pg_autoscaler # only required for nautilus
|
||||
fi
|
||||
ceph config set global osd_pool_default_pg_autoscale_mode off
|
||||
fi
|
||||
ceph config set global osd_pool_default_pg_autoscale_mode off
|
||||
}
|
||||
|
||||
function set_cluster_flags () {
|
||||
|
@ -38,4 +38,5 @@ ceph-client:
|
||||
- 0.1.35 Handle multiple mon versions in the pool job
|
||||
- 0.1.36 Add the ability to run Ceph commands from values
|
||||
- 0.1.37 Added OCI registry authentication
|
||||
- 0.1.38 Make use of noautoscale with Pacific
|
||||
...
|
||||
|
Loading…
x
Reference in New Issue
Block a user