diff --git a/ceph-client/Chart.yaml b/ceph-client/Chart.yaml index 5ebc0847c..9dca721f5 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.37 +version: 0.1.38 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 c224cd649..4f2a648a9 100644 --- a/ceph-client/templates/bin/pool/_init.sh.tpl +++ b/ceph-client/templates/bin/pool/_init.sh.tpl @@ -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 () { diff --git a/releasenotes/notes/ceph-client.yaml b/releasenotes/notes/ceph-client.yaml index a504d8cc3..cd2e3b1fe 100644 --- a/releasenotes/notes/ceph-client.yaml +++ b/releasenotes/notes/ceph-client.yaml @@ -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 ...