1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/ctdb/config
Martin Schwenke 919510d86b ctdb-scripts: Don't set arp_filter=1 by default in 10.interface
That is, no longer set sysctl net.ipv4.conf.all.arp_filter=1 in
10.interface.  Only do this in 13.per_ip_routing.

This effectively reverts commit
0ebd7beb4b by Ronnie Sahlberg from 2007.
I have discussed this with Ronnie.  This setting was originally added
to force incoming traffic to the interface hosting each IP.  This
would spread the load across multiple interfaces hosting the same
subnet.  Without the setting, incoming traffic would go to the first
interface to answer an ARP request, so could be unbalanced if one
interface tended to answer more quickly.

However, networks are now faster and interface bonding/teaming works
well in Linux, so it is less likely that multiple interfaces will be
used in this way.

Also, problems are occurring in exactly the case this is meant to
help: when multiple interfaces host the same subnet.

The Linux kernel documentation for this option says:

  arp_filter - BOOLEAN
        - 1 - Allows you to have multiple network interfaces on the same
          subnet, and have the ARPs for each interface be answered
          based on whether or not the kernel would route a packet from
          the ARP'd IP out that interface (therefore you must use source
          based routing for this to work). In other words it allows control
          of which cards (usually 1) will respond to an arp request.

        - 0 - (default) The kernel can respond to arp requests with addresses
          from other interfaces. This may seem wrong but it usually makes
          sense, because it increases the chance of successful communication.
          IP addresses are owned by the complete host on Linux, not by
          particular interfaces. Only for more complex setups like load-
          balancing, does this behaviour cause problems.

        arp_filter for the interface will be enabled if at least one of
        conf/{all,interface}/arp_filter is set to TRUE,
        it will be disabled otherwise

Note the part for arp_filter=1 that says "you must use source based
routing for this to work".  The problems are probably due to a lack of
source-based routing when this is only used with 10.interface.  In
this case, outbound packets can come from a different
interface (corresponding to the first matching route), with a
different MAC address.  There is clearly some infrastructure or packet
filtering out there that objects to such asymmetric packet flows.

So, drop this setting from 10.interface because it isn't working as
intended.  Continue to enable it in 13.per_ip_routing, which exists to
set up the required source-based routing.

This change may affect balancing of packet flows when public IP
addresses can be hosted by multiple interfaces, but does not stop that
feature from working.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>

Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Oct 17 18:53:32 UTC 2024 on atb-devel-224
2024-10-17 18:53:32 +00:00
..
events ctdb-scripts: Don't set arp_filter=1 by default in 10.interface 2024-10-17 18:53:32 +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: Avoid flapping NFS services at startup 2024-08-20 22:50: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.