ctdb-daemon: Revert "We can not assume that just because we could complete a TCP...
authorMartin Schwenke <martin@meltin.net>
Fri, 5 Apr 2019 05:17:35 +0000 (16:17 +1100)
committerAmitay Isaacs <amitay@samba.org>
Fri, 12 Apr 2019 07:11:30 +0000 (07:11 +0000)
We also can not assume that nodes can be marked as connected via only
the keepalive mechanism.  Keepalives are not sent to disconnected
nodes so, in the absence of other packets (e.g. broadcasts), 2 nodes
may never become marked as connected to each other.

Revert to marking nodes as connected in the TCP transport code.  If a
connection is to a non(-operational) ctdbd then it will revert to
disconnected after a short while and may actually flap.  This should
be rare.

This reverts commit 66919db3d7ab1e091223faf515b183af8bfddc83.

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

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

index 13452a5e83b62621b995db7267de8e06320a2da9..385547e0e78936c7de06aa6380292b51d9bec6b9 100644 (file)
@@ -122,6 +122,9 @@ static void ctdb_node_connect_write(struct tevent_context *ev,
 
        /* the queue subsystem now owns this fd */
        tnode->fd = -1;
+
+       /* tell the ctdb layer we are connected */
+       node->ctdb->upcalls->node_connected(node);
 }