From: Benoît Knecht Date: Mon, 30 Dec 2019 09:53:20 +0000 (+0100) Subject: ceph-rgw: Fix custom pool size setting X-Git-Tag: v4.0.7~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0cb12359620caf8c71d10fa33ac2c5703d4afa8b;p=ceph-ansible.git ceph-rgw: Fix custom pool size setting RadosGW pools can be created by setting ```yaml rgw_create_pools: .rgw.root: pg_num: 512 size: 2 ``` for instance. However, doing so would create pools of size `osd_pool_default_size` regardless of the `size` value. This was due to the fact that the Ansible task used ``` {{ item.size | default(osd_pool_default_size) }} ``` as the pool size value, but `item.size` is always undefined; the correct variable is `item.value.size`. Signed-off-by: Benoît Knecht (cherry picked from commit 3c31b19ab39f297635c84edb9e8a5de6c2da7707) --- diff --git a/roles/ceph-rgw/tasks/main.yml b/roles/ceph-rgw/tasks/main.yml index dad3c5504..65d0dccd5 100644 --- a/roles/ceph-rgw/tasks/main.yml +++ b/roles/ceph-rgw/tasks/main.yml @@ -35,7 +35,7 @@ run_once: true - name: customize pool size - command: "{{ container_exec_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool set {{ item.key }} size {{ item.size | default(osd_pool_default_size) }}" + command: "{{ container_exec_cmd }} ceph --connect-timeout 5 --cluster {{ cluster }} osd pool set {{ item.key }} size {{ item.value.size | default(osd_pool_default_size) }}" with_dict: "{{ rgw_create_pools }}" delegate_to: "{{ groups[mon_group_name][0] }}" changed_when: false