From: Guillaume Abrioux Date: Tue, 25 Sep 2018 12:21:44 +0000 (+0200) Subject: rolling_update: ensure pgs_by_state has at least 1 entry X-Git-Tag: v3.1.7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fdc2d7681dbd8fcd241018657a06ab8ec8099c10;p=ceph-ansible.git rolling_update: ensure pgs_by_state has at least 1 entry Previous commit c13a3c3 has removed a condition. This commit brings back this condition which is essential to ensure we won't hit a false positive result in the `when` condition for the check PGs task. Signed-off-by: Guillaume Abrioux (cherry picked from commit 179c4d00d702ff9f7a10a3eaa513c289dd75d038) --- diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 827d279ac..4abce2aed 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -410,7 +410,9 @@ command: "{{ docker_exec_cmd_update_osd|default('') }} ceph --cluster {{ cluster }} -s --format json" register: ceph_health_post until: > - ((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 + (((ceph_health_post.stdout | from_json).pgmap.pgs_by_state | length) > 0) + and + (((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 }}"