]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commit
ceph-handler: set handler on xxx_stat result
authorDimitri Savineau <dsavinea@redhat.com>
Fri, 25 Sep 2020 18:27:33 +0000 (14:27 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 29 Sep 2020 14:33:08 +0000 (16:33 +0200)
commitfabaec635180c8720c480d1ca8619ff8dfc935c0
tree5f7153eb223c12d86342dcb2b9efd7ff2551bf30
parent0dd5036f6c3f6d3a1a23063c8374f9bf4ba18e45
ceph-handler: set handler on xxx_stat result

In non containerized deployment we check if the service is running
via the socket file presence.
This is done via the xxx_socket_stat variable that check the file
socket in the /var/run/ceph/ directory.
In some scenarios, we could have the socket file still present in
that directory but not used by any process.
That's why we have the xxx_stat variable which clean those leftovers.

The problem here is that we're set the variable for the handlers status
(like handler_mon_status) based on xxx_socket_stat instead of xxx_stat.
That means we will trigger the handlers if there's an old socket file
present on the system without any process associated.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1866834
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 733596582d0788a52795bc40b1a5cd94ddef0446)
roles/ceph-handler/tasks/main.yml
roles/ceph-mon/tasks/main.yml