1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/ctdb
Martin Schwenke 4569c65288 ctdb-scripts: Add configuration variable CTDB_KILLTCP_USE_SS_KILL
This allows CTDB to be configured to use "ss -K" to reset TCP
connections on "releaseip".  This is only supported when the kernel is
configured with CONFIG_INET_DIAG_DESTROY enabled.

From the documentation:

   ss -K has been supported in ss since iproute 4.5 in March 2016 and
   in the Linux kernel since 4.4 in December 2015.  However, the
   required kernel configuration item CONFIG_INET_DIAG_DESTROY is
   disabled by default.  Although enabled in Debian kernels since
   ~2017 and in Ubuntu since at least 18.04,, this has only recently
   been enabled in distributions such as RHEL.  There seems to be no
   way, including running ss -K, to determine if this is supported, so
   use of this feature needs to be configurable.  When available, it
   should be the fastest, most reliable way of killing connections.

For RHEL and derivatives, this was enabled as follows:

* RHEL 8 via https://bugzilla.redhat.com/show_bug.cgi?id=2230213,
  arriving in version kernel-4.18.0-513.5.1.el8_9

* RHEL 9 via https://issues.redhat.com/browse/RHEL-212, arriving in
  kernel-5.14.0-360.el9

Enabling this option results in a small behaviour change because ss -K
always does a 2-way kill (i.e. it also sends a RST to the client).
Only a 1-way kill is done for SMB connections when ctdb_killtcp is
used - the reasons for this are shrouded in history and the 2-way kill
seems to work fine.

For the summary that is logged, when CTDB_KILLTCP_USE_SS_KILL is "yes"
or "try", always log the method used, even the fallback to
ctdb_killtcp.  However, when set to "no", maintain the existing
output.

The decision to use -K rather than --kill is because short options are
trivial to implement in test stubs.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jerry Heyman <jheyman@ddn.com>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Nov  7 00:12:34 UTC 2024 on atb-devel-224
2024-11-07 00:12:34 +00:00
..
client ctdb-client: Remove unused function 2024-03-06 06:05:38 +00:00
common ctdb-common: Reimplement ctdb_sys_have_ip() using new infrastructure 2024-10-07 15:58:38 +00:00
conf ctdb-conf: add boolean arg for verbosity when loading config 2024-08-06 00:43:36 +00:00
config ctdb-scripts: Add configuration variable CTDB_KILLTCP_USE_SS_KILL 2024-11-07 00:12:34 +00:00
doc ctdb-scripts: Add configuration variable CTDB_KILLTCP_USE_SS_KILL 2024-11-07 00:12:34 +00:00
event ctdb-conf: add boolean arg for verbosity when loading config 2024-08-06 00:43:36 +00:00
failover ctdb-failover: Add ctdb_smnotify_helper 2024-08-29 22:48:33 +00:00
ib ctdb-ib: Remove a use of ctdb_set_error() 2024-08-20 13:06:33 +00:00
include ctdb-daemon: Drop unused arguments 2024-10-08 05:34:30 +00:00
protocol ctdb-protocol: Add function ctdb_sock_addr_from_sockaddr() 2024-10-07 15:58:38 +00:00
server ctdb-server: Use ctdb_connection_same() to simplify 2024-11-06 23:03:42 +00:00
tcp ctdb-tcp: Modernise a DEBUG 2024-10-07 17:12:18 +00:00
tests ctdb-scripts: Add configuration variable CTDB_KILLTCP_USE_SS_KILL 2024-11-07 00:12:34 +00:00
tools ctdb-scripts: Remove unused variable NFS_HOSTNAME 2024-08-29 22:48:33 +00:00
utils ctdb-scripts: Use nfs-utils' sm-notify instead of CTDB's smnotify 2024-08-29 22:48:33 +00:00
.bzrignore
.gitignore ctdb-scripts: Use nfs-utils' sm-notify instead of CTDB's smnotify 2024-08-29 22:48:33 +00:00
configure configure/Makefile: export PYTHONHASHSEED=1 in all 'configure/Makefile' scripts 2022-03-29 22:32:32 +00:00
configure.rpm ctdb-packaging: Update library versions to upstream versions 2018-12-18 07:12:09 +01:00
COPYING
Makefile Python: remove pydoctor 2023-02-02 21:15:54 +00:00
README
wscript ctdb-build: Add missing ctdb-tcp dependency 2024-10-08 12:27:17 +00:00

This is the release version of CTDB, a clustered implementation of TDB
database used by Samba and other projects to store temporary data.

This software is freely distributable under the GNU public license,
a copy of which you should have received with this software (in a file
called COPYING).

For documentation on CTDB, please visit CTDB website http://ctdb.samba.org.