mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
176ae6c704
If a primary IP address is being deleted from an interface, the secondaries are remembered and added back after the primary is deleted. This is done under a lock shared by the add/del script code. It is necessary because, by default, Linux deletes secondaries when the corresponding primary is deleted. There is a race here between ctdbd and the scripts, since ctdbd doesn't know about the lock. If ctdbd receives a release IP control and the IP address is not on an interface then it is regarded as a "Redundant release of IP" so no "releaseip" event is generated. This can occur if the IP address in question is a secondary that has been temporarily dropped. It is more likely if the number of secondaries is large. Since Linux 2.6.12 (i.e. 2005) Linux has supported a promote_secondaries option on interfaces. This option is currently undocumented but that will change in Linux 3.14. With promote_secondaries enabled the kernel will not drop secondaries but will promote a corresponding secondary instead. The kernel does all necessary locking. Use promote_secondaries to simplify the code, avoid re-adding secondaries, avoid re-adding routes and provide improved performance. This could be done conditionally, with a fallback to legacy secondary-re-adding code, but no supported Linux distribution is running a pre-2.6.12 kernel so this is unnecessary. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> |
||
---|---|---|
.. | ||
events.d | ||
nfs-rpc-checks.d | ||
ctdb-crash-cleanup.sh | ||
ctdb.init | ||
ctdb.service | ||
ctdb.sudoers | ||
ctdb.sysconfig | ||
ctdbd_wrapper | ||
debug_locks.sh | ||
debug-hung-script.sh | ||
functions | ||
gcore_trace.sh | ||
notify.d.README | ||
notify.sh | ||
README | ||
statd-callout |
This directory contains run-time support scripts for CTDB. Selected highlights: ctdb.init An initscript for starting ctdbd at boot time. events.d/ Eventscripts. See events.d/README for more details. functions Support functions, sourced by eventscripts and other scripts. statd-callout rpc.statd high-availability callout to support lock migration on failover. 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.