From: Sébastien Han Date: Tue, 22 Aug 2017 09:56:05 +0000 (+0200) Subject: ceph-defaults: fix handler for osd container X-Git-Tag: v3.0.0rc4~25^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=abdd66619e1d5c94f74e994bff667b5ccc6b529f;p=ceph-ansible.git ceph-defaults: fix handler for osd container Problem: task "check for a ceph socket in containerized deployment" will be skipped if we are not an OSD. with_items are still evaluated before when conditions so if the task was skipped the dict will be empty and then fail. Adding a "not skipped" condition skips the execution of the task. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1482061 Signed-off-by: Sébastien Han --- diff --git a/roles/ceph-defaults/handlers/main.yml b/roles/ceph-defaults/handlers/main.yml index f661e3b1c..760c7f1da 100644 --- a/roles/ceph-defaults/handlers/main.yml +++ b/roles/ceph-defaults/handlers/main.yml @@ -45,6 +45,7 @@ # We do not want to run these checks on initial deployment (`socket_osd_container.results[n].rc == 0`) # except when a crush location is specified. ceph-disk will start the osds before the osd crush location is specified - containerized_deployment + - not item.get("skipped") - ((crush_location is defined and crush_location) or item.get('rc') == 0) - handler_health_osd_check # See https://github.com/ceph/ceph-ansible/issues/1457 for the condition below