Catch an error when pool creation failed for ceph

Ceph mon have a configure about "mon_max_pg_per_osd"
and default value is 300.
When pgs per osd is exceeded, pool creation will be failed.
But kolla-ansible ignoring this, so user may difficult to find
a main reason for the failure.
We need to catch an error when pool creation is failed.

Change-Id: I92493584faad9bc550fdeeb96b827537daafd0b8
Closes-Bug: #1747414
This commit is contained in:
hyun-ha 2018-02-05 21:36:42 +09:00
parent 70a5099376
commit 59d33d3988

View File

@ -28,7 +28,6 @@
command: docker exec ceph_mon ceph osd pool create {{ pool_name }} {{ pool_pg_num }} {{ pool_pgp_num }} {{ pool_type }} {{ 'erasure-profile' if pool_type == 'erasure' else '' }} disks command: docker exec ceph_mon ceph osd pool create {{ pool_name }} {{ pool_pg_num }} {{ pool_pgp_num }} {{ pool_type }} {{ 'erasure-profile' if pool_type == 'erasure' else '' }} disks
delegate_to: "{{ groups['ceph-mon'][0] }}" delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False changed_when: False
failed_when: False
run_once: True run_once: True
- name: Creating ceph ruleset for cache - name: Creating ceph ruleset for cache
@ -43,7 +42,6 @@
command: docker exec ceph_mon ceph osd pool create {{ pool_name }}-cache 128 128 replicated cache command: docker exec ceph_mon ceph osd pool create {{ pool_name }}-cache 128 128 replicated cache
delegate_to: "{{ groups['ceph-mon'][0] }}" delegate_to: "{{ groups['ceph-mon'][0] }}"
changed_when: False changed_when: False
failed_when: False
run_once: True run_once: True
when: ceph_enable_cache | bool when: ceph_enable_cache | bool