diff options
| author | Martin Schwenke <martin@meltin.net> | 2014-01-28 14:41:25 +1100 |
|---|---|---|
| committer | Amitay Isaacs <amitay@samba.org> | 2014-02-13 02:03:24 +0100 |
| commit | 176ae6c704528c021fcc34a41878584f43a00119 (patch) | |
| tree | 032f04cae1715a581138d305b2988574e07c2097 /python/wscript_build | |
| parent | 6a7c420a79cc1258528f152f4de9a0608767729f (diff) | |
| download | samba-176ae6c704528c021fcc34a41878584f43a00119.tar.gz samba-176ae6c704528c021fcc34a41878584f43a00119.tar.xz samba-176ae6c704528c021fcc34a41878584f43a00119.zip | |
ctdb-eventscripts: Deleting IPs should use the promote_secondaries option
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>
Diffstat (limited to 'python/wscript_build')
0 files changed, 0 insertions, 0 deletions
