]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
handler: fix bug
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 19 Dec 2019 10:29:41 +0000 (11:29 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Wed, 8 Jan 2020 22:11:42 +0000 (17:11 -0500)
411bd07d54fc3f585296b68f2fd04484328399b5 introduced a bug in handlers

using `handler_*_status` instead of `hostvars[item]['handler_*_status']`
causes handlers to be triggered in anycase even though
`handler_*_status` was set to `False` on a specific node.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1622688
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-handler/tasks/handler_mdss.yml
roles/ceph-handler/tasks/handler_mgrs.yml
roles/ceph-handler/tasks/handler_mons.yml
roles/ceph-handler/tasks/handler_nfss.yml
roles/ceph-handler/tasks/handler_osds.yml
roles/ceph-handler/tasks/handler_rbdmirrors.yml
roles/ceph-handler/tasks/handler_rgws.yml

index 5cc0da3f217fe1b13aba75cf9978d5a285c2cc22..98eaeae78ca0b01fc35eed37d21f4e6464e7ef49 100644 (file)
@@ -14,7 +14,7 @@
 - name: restart ceph mds daemon(s)
   command: /usr/bin/env bash /tmp/restart_mds_daemon.sh
   when:
-    - handler_mds_status | bool
+    - hostvars[item]['handler_mds_status'] | default(False) | bool
     - hostvars[item]['_mds_handler_called'] | default(False) | bool
   with_items: "{{ groups[mds_group_name] }}"
   delegate_to: "{{ item }}"
index 675aa840046db380f6be3fe941ad52445c143fce..b7abd0cae62f14542c0a5d26d6f4147cdaacb895 100644 (file)
@@ -14,7 +14,7 @@
 - name: restart ceph mgr daemon(s)
   command: /usr/bin/env bash /tmp/restart_mgr_daemon.sh
   when:
-    - handler_mgr_status | bool
+    - hostvars[item]['handler_mgr_status'] | default(False) | bool
     - hostvars[item]['_mgr_handler_called'] | default(False) | bool
   with_items: "{{ groups[mgr_group_name] }}"
   delegate_to: "{{ item }}"
index a6ba2a9988860ed1513f06f79b841681235d50bc..b4543e53b9dcfc7252ac97d5dba4634c2c786430 100644 (file)
@@ -18,7 +18,7 @@
   command: /usr/bin/env bash /tmp/restart_mon_daemon.sh
   when:
     # We do not want to run these checks on initial deployment (`socket.rc == 0`)
-    - handler_mon_status | bool
+    - hostvars[item]['handler_mon_status'] | default(False) | bool
     - hostvars[item]['_mon_handler_called'] | default(False) | bool
   with_items: "{{ groups[mon_group_name] }}"
   delegate_to: "{{ item }}"
index ddda7d3ab63e84a3020a4b4f0feaf5bb142f9d5a..beea2750a118e247960a696a1ace3cdf241c71a8 100644 (file)
@@ -14,7 +14,7 @@
 - name: restart ceph nfs daemon(s)
   command: /usr/bin/env bash /tmp/restart_nfs_daemon.sh
   when:
-    - handler_nfs_status | bool
+    - hostvars[item]['handler_nfs_status'] | default(False) | bool
     - hostvars[item]['_nfs_handler_called'] | default(False) | bool
   with_items: "{{ groups[nfs_group_name] }}"
   delegate_to: "{{ item }}"
index a5c97628b0439be213e5a8a94bd30c717899ead1..17354a2c254c577a436e13f9513a2b72e8e7f66e 100644 (file)
@@ -20,7 +20,7 @@
 - name: restart ceph osds daemon(s)
   command: /usr/bin/env bash /tmp/restart_osd_daemon.sh
   when:
-    - handler_osd_status | bool
+    - hostvars[item]['handler_osd_status'] | default(False) | bool
     - handler_health_osd_check | bool
     - hostvars[item]['_osd_handler_called'] | default(False) | bool
   with_items: "{{ groups[osd_group_name] | intersect(ansible_play_batch) }}"
index fcf1d325be43f96a4610bf88e0b9cdc27a1a090d..28ccb6adefa97c0a35344a5a4e7e3e72db000e7d 100644 (file)
@@ -14,7 +14,7 @@
 - name: restart ceph rbd mirror daemon(s)
   command: /usr/bin/env bash /tmp/restart_rbd_mirror_daemon.sh
   when:
-    - handler_rbd_mirror_status | bool
+    - hostvars[item]['handler_rbd_mirror_status'] | default(False) | bool
     - hostvars[item]['_rbdmirror_handler_called'] | default(False) | bool
   with_items: "{{ groups[rbdmirror_group_name] }}"
   delegate_to: "{{ item }}"
index 12d71f47cd68b464eac424c05c87d9b168441e88..aa3c1bea6a9514b90b39aac74952f0b345d2f069 100644 (file)
@@ -14,7 +14,7 @@
 - name: restart ceph rgw daemon(s)
   command: /usr/bin/env bash /tmp/restart_rgw_daemon.sh
   when:
-    - handler_rgw_status | bool
+    - hostvars[item]['handler_rgw_status'] | default(False) | bool
     - hostvars[item]['_rgw_handler_called'] | default(False) | bool
   with_items: "{{ groups[rgw_group_name] }}"
   delegate_to: "{{ item }}"