]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
defaults: fix osd handlers that are never triggered v3.1.8
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 2 Oct 2018 21:58:38 +0000 (23:58 +0200)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Wed, 3 Oct 2018 14:09:39 +0000 (14:09 +0000)
`run_once: true` + `inventory_hostname == groups.get(osd_group_name) |
last` is a bad combination since if the only node being run isn't the
last, the task will be definitly skipped.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-defaults/handlers/main.yml

index 691a9693ebe0a7ac47aae25714ba1fbd55a12b79..a66c8048a9d6d423a87a54e8b7e4049c3422aa7a 100644 (file)
@@ -85,7 +85,7 @@
   when:
     - osd_group_name in group_names
     - not containerized_deployment
-    - not rolling_update
+    - not (rolling_update | default(False))
     # 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
     - osd_socket_stat.rc == 0
     # except when a crush location is specified. ceph-disk will start the osds before the osd crush location is specified
     - osd_group_name in group_names
     - containerized_deployment
-    - not rolling_update
-    - ceph_osd_container_stat.get('rc') == 0
+    - not (rolling_update | default(False))
+    - hostvars[item]['ceph_osd_container_stat'].get('rc') == 0
     - inventory_hostname == groups.get(osd_group_name) | last
-    - ceph_osd_container_stat.get('stdout_lines', [])|length != 0
+    - hostvars[item]['ceph_osd_container_stat'].get('stdout_lines', [])|length != 0
     - handler_health_osd_check
     - hostvars[item]['_osd_handler_called'] | default(False)
   with_items: "{{ groups[osd_group_name] }}"
   delegate_to: "{{ item }}"
-  run_once: True
 
 - name: set _osd_handler_called after restart
   set_fact: