ctdb-tests: Do not attempt to unregister the join handler multiple times
authorAmitay Isaacs <amitay@gmail.com>
Thu, 5 Jan 2017 04:05:56 +0000 (15:05 +1100)
committerMartin Schwenke <martins@samba.org>
Fri, 6 Jan 2017 11:27:23 +0000 (12:27 +0100)
commit4635c22411a7864dd70703f854ec9844816e0294
tree1607fa7a7e815e771c7f398829b0078edfd51adf
parent1dc1689e7402f6f90af3ddd4c7d33d140892ff2a
ctdb-tests: Do not attempt to unregister the join handler multiple times

MSG_ID_SYNC is broadcast to each node when a MSG_ID_JOIN has been
received from all nodes.  After MSG_ID_SYNC is successfully broadcast,
the join handler is unregistered.  However, if another MSG_ID_JOIN is
received before the join handler is unregistered then MSG_ID_SYNC is
re-broadcast.  This results in multiple attempts to unregister the
join handler.

Once all MSG_ID_JOIN messages are received, unregister the join handler
to ignore any extra MSG_ID_JOIN messages.  Also, make sure that while
join handler is being unregistered, MSG_ID_JOIN messages are ignored.

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

Identified-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Jan  6 12:27:23 CET 2017 on sn-devel-144
ctdb/tests/src/cluster_wait.c