mirror of https://github.com/ceph/ceph-ansible.git
ensure at least one osd is up
The existing task checks that the number of OSDs is equal to the number of up OSDs before continuing. The problem is that if none of the OSDs have been discovered yet, the task will exit immediately and subsequent pool creation will fail (num_osds = 0, num_up_osds = 0). This is related to Bugzilla 1578086. In this change, we also check that at least one OSD is present. In our testing, this results in the task correctly waiting for all OSDs to come up before continuing. Signed-off-by: David Waiting <david_waiting@comcast.com>pull/3620/head
parent
7f7f3769b3
commit
3930791cb7
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
- name: wait for all osd to be up
|
||||
shell: >
|
||||
test "$({{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print(json.load(sys.stdin)["osdmap"]["osdmap"]["num_osds"])')" -gt 0 &&
|
||||
test "$({{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print(json.load(sys.stdin)["osdmap"]["osdmap"]["num_osds"])')" =
|
||||
"$({{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print(json.load(sys.stdin)["osdmap"]["osdmap"]["num_up_osds"])')"
|
||||
register: wait_for_all_osds_up
|
||||
|
|
Loading…
Reference in New Issue