1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

80 Commits

Author SHA1 Message Date
Ronnie Sahlberg
c915f2e5d5 add an extra test for the bond devices and check that there is an active slave.
this to handle the case where all links do have a physical layer, but where all slaves have been disabled using ifdown

(This used to be ctdb commit bf50709630df000583f2b0ef0edc177c01d60eaf)
2009-11-05 12:12:06 +11:00
Ronnie Sahlberg
ff8363697d treat interfaces with the name ethX* as bond devices
(This used to be ctdb commit 3997d7e5471810e9a2f145ce2e795073dfc5eded)
2009-10-21 11:34:17 +11:00
Ronnie Sahlberg
f3fd4bb659 redirect stderr to dev null since the rule might not exist when we try to unconditionally delete it
(This used to be ctdb commit e1d709f32196e19d4041ee2958e143791762e08f)
2009-09-02 03:12:27 +10:00
Michael Adam
34d2bb1f6c set broadcast addresses in the takeip event.
Michael

(This used to be ctdb commit e26d9d32e68e7db1cf4f96c47c0126e9e0b213be)
2009-08-28 06:50:53 +10:00
Michael Adam
1cf23b1bd7 Improve the monitor event test for ethernet interfaces (link detection).
On some systems, the ethtool link detection is not successful when a
cable is plugged but the interface has not been brought up previously.
This improves the test by bringing the interface up (without checking
for success here) and trying the ethtool test again afterwards.

Michael

(This used to be ctdb commit 0c2a7bf18c65452ca1c2f0539bf692507d91e3c6)
2008-12-12 09:19:23 +11:00
Michael Adam
54da843031 Use "grep -q" instead of "grep ... > /dev/null" in events.d/10.interfaces
This enhances readability.

Michael

(This used to be ctdb commit 9c6816e040d42d293eaf9ce41eff639135e8b2f5)
2008-12-12 09:18:30 +11:00
Ronnie Sahlberg
ddf2de2154 Do not fail the takeip event if the "ip addr add ..." command failed.
Let the event complete successfully.   the local recovery daemon will check that we have the address and reissue takip othervise.

There are several reasons why "ip addr add "  can fail, one is a misconfiguration
anothe ris that for ipv6 the stack is a lot more picky than for ipv4.     for examplke this WILL fail in ipv6 if there is a duplicate ip address on the network.

thus  this check could cause rolling-recoveries  which is why it has to go

(This used to be ctdb commit 12bc85c90a640a72ff538c003eb81da9dd1f2e3f)
2008-08-22 09:25:47 +10:00
Ronnie Sahlberg
78beb27966 From Alexander Saupp.
If we use vlan tagging and bonding we must strip the vlan part off the name
so we can check the main bonde device for status.

I.e. check bond0  instead of bond0.<VLANTAG>

(This used to be ctdb commit 795c190b004d404b84dda053593139ed51d345e5)
2008-07-28 17:07:44 +10:00
Ronnie Sahlberg
6820f4ea15 dont use an absolute pathname for the iptables tool
(This used to be ctdb commit 8f87385c09b16c0e32d797c4b442865d8185d9ee)
2008-02-07 15:36:26 +11:00
Ronnie Sahlberg
a8ea67203f change the IF interface is a BOND THEN xxx ELSE assume everything is ethernet
into a case and add an arm for ib*) (infiniband interfaces)

Dont try using ethtool on ib devices
(mii_tool doesnt work either)

IB does have a command ibv_devinfo   which can tell whether a physical port
is up or not   but it seems nontrivial to map this into a interface name such as ib0

(This used to be ctdb commit ab6bd25542946a732b4378f5476edfb466d6c000)
2008-02-07 09:35:46 +11:00
Andrew Tridgell
d815bc6f26 the event scripts no longer need to show a date, as its done by the main ctdbd logging function
(This used to be ctdb commit b5e691c4c3fe80b219a9ac355d28b766cb0303f3)
2008-01-16 22:06:44 +11:00
Ronnie Sahlberg
8599f2008d if bond* interfaces are used as public interfaces we can not rely on ethtool but
have to check /proc for the status instead

(This used to be ctdb commit 4ed7747267aea265b7a71c651abf6d5db4f4718b)
2007-10-29 10:51:16 +11:00
Ronnie Sahlberg
fa5d51c238 move the kill_tcp_connections() function from 10.interfaces to functions
(This used to be ctdb commit 055948530fb16bf49c42fc4489f29a21665156c0)
2007-10-11 07:27:38 +10:00
Andrew Tridgell
c62490569b cope with non-standard install dirs in event scripts
(This used to be ctdb commit 52fff5345873690a9cc86495f414343eaa3bd540)
2007-09-14 14:14:03 +10:00
Andrew Tridgell
955d4d8615 make sure all public IPs are removed at startup
(This used to be ctdb commit b16f33787f2a9471285037f4a6d470e826536570)
2007-09-14 11:56:40 +10:00
Ronnie Sahlberg
8edcd3f83f during startup make sure to delete any public addresses from any
interface

(This used to be ctdb commit 18d80ea6db39e61f60e4c01de164d58bcbd8ab10)
2007-09-14 10:37:10 +10:00
Andrew Tridgell
6fa6101b1a more shell scripting fixes in 10.interface
(This used to be ctdb commit 4ee2230b3f2ae7437a9d0cf973eb4645d276accd)
2007-09-13 11:57:42 +10:00
Andrew Tridgell
25940014c0 fixed script errors in 10.interface
(This used to be ctdb commit 0c759614d27758cef3eba5942b2cccad54193cbb)
2007-09-13 11:19:30 +10:00
Andrew Tridgell
023b885793 new approach for killing TCP connections on IP release
(This used to be ctdb commit c33a0db29b5604966f582b1f8c5fd66760c72197)
2007-09-13 10:24:48 +10:00
Andrew Tridgell
6c77184d96 - set arp_ignore to prevent replying to arp requests for addresses on loopback
- put removed IPs on loopback with scope host
- check for nul strings in ethtool call
;

(This used to be ctdb commit e2df1d6d08e67a36ff05a590a34c56e900741287)
2007-09-12 13:23:36 +10:00
Andrew Tridgell
a6728e0520 fixed location of arp_filter
(This used to be ctdb commit ea239c82fca2b9a648d21e5c603e632011958452)
2007-09-11 16:38:32 +10:00
Ronnie Sahlberg
4ac749bfa4 change the signature to ctdb_sys_have_ip() to also return:
a bool that specifies whether the ip was held by a loopback adaptor or 
not
 the name of the interface where the ip was held

when we release an ip address from an interface, move the ip address 
over to the loopback interface

when we release an ip address  after we have move it onto loopback, 
use 60.nfs to kill off the server side (the local part) of the tcp 
connection   so that the tcp connections dont survive a 
failover/failback

61.nfstickle,   since we kill hte tcp connections when we release an ip 
address   we no longer need to restart the nfs service in 61.nfstickle

update ctdb_takeover to use the new signature for ctdb_sys_have_ip

when we add a tcp connection to kill in ctdb_killtcp_add_connection()
check if either the srouce or destination address match a known public 
address

(This used to be ctdb commit f9fd2a4719c50f6b8e01d0a1b3a74b76b52ecaf3)
2007-09-10 07:20:44 +10:00
Ronnie Sahlberg
0ebd7beb4b set /proc/sys/net/ipv4/conf/all/arp_filter to 1 by default when
10.interfaces startsup

this setting makes the system only respond to APR requests from the NIC 
where the ip address is tied to and adds to the 
"principle of least surprise" when using multihoming servers

(This used to be ctdb commit 39ddf347dc45f599964a4c17e67e71faed00e544)
2007-09-08 08:09:02 +10:00
Ronnie Sahlberg
12ebb74838 change how we do public addresses and takeover so that we can have
multiple public addresses spread across multiple interfaces on each 
node.

this is a massive patch since we have previously made the assumtion that 
we only have one public address per node.

get rid of the public_interface argument.  the public addresses file 
now explicitely lists which interface the address belongs to

(This used to be ctdb commit 462ebbc791e906a6b874c862defea43235597ca8)
2007-09-04 09:50:07 +10:00
Ronnie Sahlberg
741af6a468 note that there is no link on the PUBLIC interface
(This used to be ctdb commit 3582f12f837dbd3c866cdffd2e7f5c20bae59d10)
2007-06-14 17:26:42 +10:00
Andrew Tridgell
2703ba210d merge from ronnie
(This used to be ctdb commit 1a0bd55dd27939110385e00dad73726a8ba66747)
2007-06-11 09:43:23 +10:00
Ronnie Sahlberg
47edceec09 when public interface is not set, print this to the logfile before
exiting the script

(This used to be ctdb commit 79f4a9faea7583aad6f39733d019ba416a4be6e5)
2007-06-11 08:42:51 +10:00
Andrew Tridgell
4e0b95ec9c newer versions of ip need the mask on del
(This used to be ctdb commit b5b13125506256f9ef6599498ee046e73b52df66)
2007-06-09 21:46:42 +10:00
Andrew Tridgell
76b7361c7e - added monitoring of rpc ports for nfs, and of Samba ports and directories
- added monitoring of the ethernet link state

When monitoring detects an error, the node loses its public IP address

(This used to be ctdb commit 0af57aead8c983511d25774b4ffe09fa5ff26501)
2007-06-06 12:08:42 +10:00
Andrew Tridgell
cc9f6d30d8 split out the basic interface handling, and run event scripts in a deterministic order
(This used to be ctdb commit 399e993a4a233a5953e1e7264141e5c7c8c8c711)
2007-06-04 15:09:03 +10:00