]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-tcp: move free of inbound queue to TCP restart
authorNoel Power <noel.power@suse.com>
Sat, 29 Feb 2020 15:49:28 +0000 (15:49 +0000)
committerKarolin Seeger <kseeger@samba.org>
Tue, 24 Mar 2020 07:26:17 +0000 (07:26 +0000)
Since commit 77deaadca8e8dbc3c92ea16893099c72f6dc874e, a nodeA which
had previously accepted a connection from nodeB (where nodeB dies
e.g. as as result of fencing) when nodeB attempts to connect again
after restarting is always rejected with

 ctdb_listen_event: Incoming queue active, rejecting connection from w.x.y.z

messages.

Consolidate dead node handling in the TCP restart handling.

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

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit 0ff1b78fc2f0491f9e11131d0040bdaba8873770)

ctdb/tcp/tcp_init.c
ctdb/tcp/tcp_io.c

index 0f9423ad6fca399f3d14850a5a0f738287bbd70f..a112b52fa0da74a8876091cbb80db572cc67f053 100644 (file)
@@ -121,7 +121,7 @@ static void ctdb_tcp_restart(struct ctdb_node *node)
                node->transport_data, struct ctdb_tcp_node);
 
        DEBUG(DEBUG_NOTICE,("Tearing down connection to dead node :%d\n", node->pnn));
-
+       TALLOC_FREE(tnode->in_queue);
        ctdb_tcp_stop_connection(node);
 
        tnode->connect_te = tevent_add_timer(node->ctdb->ev, tnode,
index df9ca02b413fe9da4f94d43640b3cec83ce8190e..bcb18fbf300affdd92cc41067be7e4b4b88ad08a 100644 (file)
@@ -75,7 +75,6 @@ void ctdb_tcp_read_cb(uint8_t *data, size_t cnt, void *args)
        return;
 
 failed:
-       TALLOC_FREE(tnode->in_queue);
        node->ctdb->upcalls->node_dead(node);
 
        TALLOC_FREE(data);