1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/ctdb/config
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
..
events ctdb-scripts: Track connections for all ports for public IPs 2024-11-06 23:03:42 +00:00
nfs-checks.d ctdb-scripts: Stop/start mount/rquotad/status via NFS call-out 2019-03-31 10:45:20 +00:00
ctdb-backup-persistent-tdbs.sh ctdb-scripts: Add support for backing up persistent TDBs 2024-08-29 22:48:33 +00:00
ctdb-crash-cleanup.sh ctdb-scripts: Avoid ShellCheck warning SC2164 2022-07-22 06:38:32 +00:00
ctdb.conf ctdb-config: [cluster] recovery lock -> [cluster] cluster lock 2022-01-17 10:21:33 +00:00
ctdb.init ctdb-scripts: Drop uses of ctdbd_wrapper 2022-04-06 06:34:37 +00:00
ctdb.sysconfig ctdb-config: Drop CTDB_STARTUP_TIMEOUT 2022-04-06 06:34:37 +00:00
ctdb.tunables ctdb-scripts: Tunables are now loaded from ctdb.tunables 2018-03-28 02:57:21 +02:00
debug_locks.sh ctdb: Fix a typo 2024-09-20 17:13:37 +00:00
debug-hung-script.sh ctdb-scripts: Avoid ShellCheck warning SC2164 2022-07-22 06:38:32 +00:00
functions ctdb-scripts: Add configuration variable CTDB_KILLTCP_USE_SS_KILL 2024-11-07 00:12:34 +00:00
nfs-linux-kernel-callout ctdb-scripts: Add script option CTDB_NFS_EXPORTS_FILE 2024-05-30 11:42:30 +00:00
notification.README ctdb-scripts: Change directory for notifications to events/notification 2018-06-05 17:47:26 +02:00
notify.sh ctdb-scripts: Change directory for notifications to events/notification 2018-06-05 17:47:26 +02:00
README ctdb-failover: Split statd_callout add-client/del-client 2024-06-25 04:24:57 +00:00
script.options ctdb-scripts: Drop event script CTDB_MANAGED_<service> variables 2018-07-11 11:48:39 +02:00

This directory contains run-time support scripts for CTDB.

Selected highlights:

  ctdb.init

    An initscript for starting ctdbd at boot time.

  events/

    Eventscripts.  See events/README for more details.

  functions

    Support functions, sourced by eventscripts and other scripts.

Notes:

* All of these scripts are written in POSIX Bourne shell.  Please
  avoid bash-isms, including the use of "local" variables (which are
  not available in POSIX shell).

* Do not use absolute paths for commands.  Unit tests attempt to
  replace many commands with stubs and can not do this if commands are
  specified with absolute paths.  The functions file controls $PATH so
  absolute paths should not be required.