mon: add support for expected-num-objects

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 <seb@redhat.com>
pull/2450/head
Sébastien Han 2018-03-05 09:56:03 +01:00 committed by Guillaume Abrioux
parent 18402b636f
commit 0011edd2bc
3 changed files with 11 additions and 1 deletions

View File

@ -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 }}"

View File

@ -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 }}"

View File

@ -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