fix pool min_size customization

b8d580b3f4 introduced a bug when
`min_size` isn't set (default to 0).

Typical error:

```
Error EINVAL: pool min_size must be between 1 and 1
```

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/3683/head
Guillaume Abrioux 2019-03-05 13:46:18 +01:00 committed by mergify[bot]
parent b8d580b3f4
commit e9e5d5a39a
3 changed files with 3 additions and 3 deletions

View File

@ -122,7 +122,7 @@
changed_when: false changed_when: false
when: when:
- pools | length > 0 - pools | length > 0
- item.min_size | default(osd_pool_default_min_size) != ceph_osd_pool_default_min_size - item.min_size | default(osd_pool_default_min_size) > ceph_osd_pool_default_min_size
- name: assign application to pool(s) - name: assign application to pool(s)
command: "{{ docker_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd pool application enable {{ item.name }} {{ item.application }}" command: "{{ docker_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd pool application enable {{ item.name }} {{ item.application }}"

View File

@ -22,7 +22,7 @@
delegate_to: "{{ groups[mon_group_name][0] }}" delegate_to: "{{ groups[mon_group_name][0] }}"
changed_when: false changed_when: false
when: when:
- item.min_size | default(osd_pool_default_min_size) != ceph_osd_pool_default_min_size - item.min_size | default(osd_pool_default_min_size) > ceph_osd_pool_default_min_size
- name: check if ceph filesystem already exists - name: check if ceph filesystem already exists
command: "{{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} fs get {{ cephfs }}" command: "{{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} fs get {{ cephfs }}"

View File

@ -60,7 +60,7 @@
delegate_to: "{{ groups[mon_group_name][0] }}" delegate_to: "{{ groups[mon_group_name][0] }}"
changed_when: false changed_when: false
when: when:
- item.min_size | default(osd_pool_default_min_size) != ceph_osd_pool_default_min_size - item.min_size | default(osd_pool_default_min_size) > ceph_osd_pool_default_min_size
- name: assign application to pool(s) - name: assign application to pool(s)
command: "{{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} osd pool application enable {{ item.name }} {{ item.application }}" command: "{{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} osd pool application enable {{ item.name }} {{ item.application }}"