From 6908f7070c3457936aabf87b88f2fe046ce2f80d Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:42:30 -0400 Subject: [PATCH] Properly disable autoscaling PGs --- oneshot/upgrade-pvc-cluster_deb12.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/oneshot/upgrade-pvc-cluster_deb12.yml b/oneshot/upgrade-pvc-cluster_deb12.yml index 8107aff..982b249 100644 --- a/oneshot/upgrade-pvc-cluster_deb12.yml +++ b/oneshot/upgrade-pvc-cluster_deb12.yml @@ -387,8 +387,17 @@ - name: disable default pg autoscaler command: ceph config set global osd_pool_default_pg_autoscale_mode off - - name: disable pg autoscaler - command: ceph osd pool set noautoscale + - name: get pools + shell: "ceph osd lspools | awk '{ $1=\"\"; print $0 }' | tr -d ' '" + register: pool_output + + - name: set pools fact + set_fact: + ceph_pools: "{{ pool_output.stdout.split('\n') | list }}" + + - name: disable pg autoscaler on each pool + command: "ceph osd pool set {{ item }} pg_autoscale_mode off" + loop: "{{ ceph_pools }}" - name: set OSDs to require pacific command: ceph osd require-osd-release pacific