mirror of https://github.com/ceph/ceph-ansible.git
switch: rework and fix clean pg wait
Signed-off-by: Sébastien Han <seb@redhat.com>pull/2009/head
parent
c693e95cbf
commit
c3c63ae539
|
@ -280,14 +280,16 @@
|
|||
- ceph-osd
|
||||
|
||||
post_tasks:
|
||||
- name: waiting for clean pgs...
|
||||
shell: |
|
||||
test "[""$(docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print(json.load(sys.stdin)["pgmap"]["num_pgs"])')""]" = "$(docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if i["state_name"] == "active+clean"]')"
|
||||
register: result
|
||||
until: result.rc == 0
|
||||
- name: container - waiting for clean pgs...
|
||||
command: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph --cluster {{ cluster }} -s --format json"
|
||||
register: ceph_health_post
|
||||
until: >
|
||||
((ceph_health_post.stdout | from_json).pgmap.pgs_by_state | length) == 1
|
||||
and
|
||||
(ceph_health_post.stdout | from_json).pgmap.pgs_by_state.0.state_name == "active+clean"
|
||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||
retries: "{{ health_osd_check_retries }}"
|
||||
delay: "{{ health_osd_check_delay }}"
|
||||
delegate_to: "{{ groups[mon_group_name][0] }}"
|
||||
|
||||
|
||||
- name: switching from non-containerized to containerized ceph mds
|
||||
|
|
Loading…
Reference in New Issue