From 0011edd2bc1c25dad835197836a9eeefc086f162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 5 Mar 2018 09:56:03 +0100 Subject: [PATCH] mon: add support for expected-num-objects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds the support for expected-num-objects when creating a pool. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1541520 Signed-off-by: Sébastien Han --- group_vars/mons.yml.sample | 5 +++++ roles/ceph-mon/defaults/main.yml | 5 +++++ roles/ceph-mon/tasks/openstack_config.yml | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/group_vars/mons.yml.sample b/group_vars/mons.yml.sample index 3b7e5f104..06653e49d 100644 --- a/group_vars/mons.yml.sample +++ b/group_vars/mons.yml.sample @@ -90,22 +90,27 @@ dummy: # name: images # pg_num: "{{ osd_pool_default_pg_num }}" # rule_name: "" +# size: "" #openstack_cinder_pool: # name: volumes # pg_num: "{{ osd_pool_default_pg_num }}" # rule_name: "" +# size: "" #openstack_nova_pool: # name: vms # pg_num: "{{ osd_pool_default_pg_num }}" # rule_name: "" +# size: "" #openstack_cinder_backup_pool: # name: backups # pg_num: "{{ osd_pool_default_pg_num }}" # rule_name: "" +# size: "" #openstack_gnocchi_pool: # name: metrics # pg_num: "{{ osd_pool_default_pg_num }}" # rule_name: "" +# size: "" #openstack_pools: # - "{{ openstack_glance_pool }}" diff --git a/roles/ceph-mon/defaults/main.yml b/roles/ceph-mon/defaults/main.yml index 6bdc80ba2..6bb6bfe73 100644 --- a/roles/ceph-mon/defaults/main.yml +++ b/roles/ceph-mon/defaults/main.yml @@ -82,22 +82,27 @@ openstack_glance_pool: name: images pg_num: "{{ osd_pool_default_pg_num }}" rule_name: "" + size: "" openstack_cinder_pool: name: volumes pg_num: "{{ osd_pool_default_pg_num }}" rule_name: "" + size: "" openstack_nova_pool: name: vms pg_num: "{{ osd_pool_default_pg_num }}" rule_name: "" + size: "" openstack_cinder_backup_pool: name: backups pg_num: "{{ osd_pool_default_pg_num }}" rule_name: "" + size: "" openstack_gnocchi_pool: name: metrics pg_num: "{{ osd_pool_default_pg_num }}" rule_name: "" + size: "" openstack_pools: - "{{ openstack_glance_pool }}" diff --git a/roles/ceph-mon/tasks/openstack_config.yml b/roles/ceph-mon/tasks/openstack_config.yml index 7bf2293fe..97889ac56 100644 --- a/roles/ceph-mon/tasks/openstack_config.yml +++ b/roles/ceph-mon/tasks/openstack_config.yml @@ -1,6 +1,6 @@ --- - name: create openstack pool(s) - command: "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} osd pool create {{ item.name }} {{ item.pg_num }} {{ item.rule_name|default('') }}" + command: "{{ docker_exec_cmd }} ceph --cluster {{ cluster }} osd pool create {{ item.name }} {{ item.pg_num }} {{ item.rule_name|default('') }} {{ item.size|default('') }}" with_items: "{{ openstack_pools | unique }}" changed_when: false failed_when: false