diff options
author | Noel Power <noel.power@suse.com> | 2020-02-29 15:49:28 +0000 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2020-03-19 09:37:11 +0000 |
commit | 04e5ac81498cf5c160c5cc506c06993dd0c007b0 (patch) | |
tree | 3d6d60faf705df0d4dd8578d652814f4169dead2 /ctdb | |
parent | b6419a9e9fcee7560d181382970e7f05e874f63d (diff) | |
download | samba-04e5ac81498cf5c160c5cc506c06993dd0c007b0.tar.gz |
ctdb-tcp: move free of inbound queue to TCP restart
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)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/tcp/tcp_init.c | 2 | ||||
-rw-r--r-- | ctdb/tcp/tcp_io.c | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c index 5bd9e2f3a09..7ea079d2303 100644 --- a/ctdb/tcp/tcp_init.c +++ b/ctdb/tcp/tcp_init.c @@ -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, diff --git a/ctdb/tcp/tcp_io.c b/ctdb/tcp/tcp_io.c index df9ca02b413..bcb18fbf300 100644 --- a/ctdb/tcp/tcp_io.c +++ b/ctdb/tcp/tcp_io.c @@ -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); |