From 54b02fe1876cb6a33aebd8fcba04bd426f30b967 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 2 Oct 2018 17:31:49 +0200 Subject: [PATCH] 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 --- ...h-from-non-containerized-to-containerized-ceph-daemons.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }}" -- 2.39.5