diff options
author | Martin Schwenke <martin@meltin.net> | 2018-10-11 11:26:06 +1100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2018-10-25 07:59:09 +0200 |
commit | 1616cbd522c05355394064426d7947cba72dc7ec (patch) | |
tree | a1d99c62070daa420fe9f1d704bd2f1a2fdadeef /ctdb | |
parent | a835e64f2e76837d9da2c51c1612e485f0b9047b (diff) | |
download | samba-1616cbd522c05355394064426d7947cba72dc7ec.tar.gz |
ctdb-daemon: Exit if eventd goes away
ctdbd enters a broken state if eventd goes away. A clean shutdown is
not possible because that involves running events. Restarting eventd
is possible but this might mask a serious problem and it is possible
that eventd might keep on disappearing. Just exit.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13659
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit c9e1603a5d0c1a216439d4a2b0e7cdc05181e898)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/eventscript.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/ctdb/server/eventscript.c b/ctdb/server/eventscript.c index 31f267c5c8e..11a87063122 100644 --- a/ctdb/server/eventscript.c +++ b/ctdb/server/eventscript.c @@ -324,13 +324,8 @@ static void eventd_dead_handler(struct tevent_context *ev, struct tevent_fd *fde, uint16_t flags, void *private_data) { - struct eventd_context *ectx = talloc_get_type_abort( - private_data, struct eventd_context); - - DEBUG(DEBUG_ERR, ("Eventd went away\n")); - - TALLOC_FREE(ectx->eventd_fde); - ectx->eventd_pid = -1; + D_ERR("Eventd went away - exiting\n"); + exit(1); } void ctdb_stop_eventd(struct ctdb_context *ctdb) |