ctdb-daemon: Wait for eventd to be ready before connecting
authorMartin Schwenke <martin@meltin.net>
Mon, 27 Aug 2018 04:47:38 +0000 (14:47 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 30 Aug 2018 02:48:56 +0000 (04:48 +0200)
commit62ec1ab1470206d6a2cf300f30ca0b4a39413a38
tree0e79f990573c1817a8a2336246ddbfacaf029116
parentc446ae5e1382d5e32c33ce92243daf6b4338e15a
ctdb-daemon: Wait for eventd to be ready before connecting

The current method of retrying the connection to eventd means that
messages get logged for each failure.

Instead, pass a pipe file descriptor to eventd and wait for it to
write 0 to the pipe to indicate that it is ready to accept client
connections.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13592

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/eventscript.c