ctdb: add/implement CTDB_CONTROL_TCP_CLIENT_PASSED
authorStefan Metzmacher <metze@samba.org>
Fri, 17 Nov 2023 14:59:57 +0000 (15:59 +0100)
committerJule Anger <janger@samba.org>
Sat, 16 Dec 2023 15:07:14 +0000 (15:07 +0000)
commit118d6c81ec9fd19a98d5f674ccff2a57aed81881
tree18494984ecd7a042b094b22edbad691e601114f6
parentb6906f37c667677dcac9bcfd6cc182869cb6f569
ctdb: add/implement CTDB_CONTROL_TCP_CLIENT_PASSED

With multichannel a tcp connection is registered first with
a temporary smbd process, that calls CTDB_CONTROL_TCP_CLIENT
first and then passes the tcp connection to the longterm smbd
that already handles all connections belonging to the specific
client_guid. That smbd process calls CTDB_CONTROL_TCP_CLIENT
again, but the 'tickle' information is already there.
When the temporary smbd process exists/disconnects from ctdb
or calls CTDB_CONTROL_TCP_CLIENT_DISCONNECTED, the 'tickle'
information is removed, while the longterm smbd process
still serves the tcp connection.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit 037e8e449deb136ad5ed5e4de05439411b545b6d)
ctdb/include/ctdb_private.h
ctdb/protocol/protocol.h
ctdb/protocol/protocol_control.c
ctdb/protocol/protocol_debug.c
ctdb/server/ctdb_control.c
ctdb/server/ctdb_takeover.c