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)
committerStefan Metzmacher <metze@samba.org>
Wed, 5 Sep 2018 11:31:40 +0000 (13:31 +0200)
commit0f342d4595475e8d45cd954f040a5e9dab0a277f
tree6094249b7d82aba15b93f526a3aa9af3039aad20
parenteb3d91ed61ee5ab3afa862a001e0ca2db9793698
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>
(cherry picked from commit 62ec1ab1470206d6a2cf300f30ca0b4a39413a38)
Signed-off-by: Martin Schwenke <martin@meltin.net>
ctdb/server/eventscript.c