From: Guillaume Abrioux Date: Tue, 2 Oct 2018 15:31:49 +0000 (+0200) Subject: switch: support migration when cluster is scrubbing X-Git-Tag: v3.2.0beta4~30 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=54b02fe1876cb6a33aebd8fcba04bd426f30b967;p=ceph-ansible.git switch: support migration when cluster is scrubbing Similar to c13a3c3 we must allow scrubbing when running this playbook. In cluster with a large number of PGs, it can be expected some of them scrubbing, it's a normal operation. Preventing from scrubbing operation force to set noscrub flag. This commit allows to switch from non containerized to containerized environment even while PGs are scrubbing. Closes: #3182 Signed-off-by: Guillaume Abrioux --- diff --git a/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml b/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml index 39f8e674e..827fd8efe 100644 --- a/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml +++ b/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml @@ -295,9 +295,9 @@ 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 + (((ceph_health_post.stdout | from_json).pgmap.pgs_by_state | length) > 0) and - (ceph_health_post.stdout | from_json).pgmap.pgs_by_state.0.state_name == "active+clean" + (((ceph_health_post.stdout | from_json).pgmap.pgs_by_state | selectattr('state_name', 'search', '^active\\+clean') | map(attribute='count') | list | sum) == (ceph_pgs.stdout | from_json).pgmap.num_pgs) delegate_to: "{{ groups[mon_group_name][0] }}" retries: "{{ health_osd_check_retries }}" delay: "{{ health_osd_check_delay }}"