From abdd66619e1d5c94f74e994bff667b5ccc6b529f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 22 Aug 2017 11:56:05 +0200 Subject: [PATCH] ceph-defaults: fix handler for osd container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- roles/ceph-defaults/handlers/main.yml | 1 + 1 file changed, 1 insertion(+) 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