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

91 Commits

Author SHA1 Message Date
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
35ee7d4999 in the 91.lvs event script
IF lvs has been configured, check that the ipvsadm package has also
been installed since we depend on it.
If not, log an error and return 1

(This used to be ctdb commit 506174bbc47f1176122be2e55099149e3db27d57)
2008-02-07 09:42:35 +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
Ronnie Sahlberg
2a0e73bff0 add monitoring of iscsi to the eventscript
(This used to be ctdb commit e190c4d71c0b54f4c6615258986770eba15f335d)
2008-02-06 14:26:35 +11:00
Ronnie Sahlberg
64b6df09a0 update ctdb version
change flags for 41.httpd

(This used to be ctdb commit 88527a4a5423014f9911fa6061632215e153eb7e)
2008-02-06 14:00:04 +11:00
Ronnie Sahlberg
55efef3237 add an eventscript to start/stop iscsi
(This used to be ctdb commit 1aecd8c9dc2855c40c9182f30e4e71bdae5705e3)
2008-02-06 12:41:00 +11:00
Andrew Tridgell
3777346629 partial merge from ronnie
(This used to be ctdb commit fd316deb8a9e0545c8efa1bfc8ad83962b310405)
2008-01-29 11:39:06 +11:00
Andrew Tridgell
6b50533c22 fixed egrep pattern to use more compatible expression for spaces
(This used to be ctdb commit 2da3871417bb05da8802093ceeb02e89102d99ad)
2008-01-28 17:27:16 +11:00
Andrew Tridgell
3c5bf1fa01 merged 60.nfs changes from ronnie
(This used to be ctdb commit aa7996d4555883360082d9017185464b3551ae08)
2008-01-21 12:46:11 +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
59327234ac add eventscript for http
(This used to be ctdb commit 16cba208b041c2bd8dbf801af89dcbcde486abf2)
2008-01-11 10:44:16 +11:00
Andrew Tridgell
624898bd81 auto-run the vacuum and repack ops every 5 minutes by default
(This used to be ctdb commit 3fc3f3d15a0f51811b32ff7b554d1f8ce9715358)
2008-01-10 10:04:03 +11:00
Andrew Tridgell
4879d465fa forgot this file
(This used to be ctdb commit d715bef49a88f9084f53b3c88307848ed8434a50)
2008-01-09 08:41:27 +11:00
Andrew Tridgell
61fd2d5d6f background the smbstatus -n command
(This used to be ctdb commit 0a05cc6763aa6e57089d3ce70516d359fcddb0e4)
2008-01-07 23:41:07 +11:00
Andrew Tridgell
d38fbaa38b nicer onnode output
(This used to be ctdb commit ac5c1e090d007bc2e3965589731620b87c0217fb)
2008-01-07 14:31:13 +11:00
Andrew Tridgell
30e18ed48e don't retstart statd when we don't need to
(This used to be ctdb commit 94059f108b14c4a2442a40cf8f0eceb612c5d14a)
2008-01-07 14:05:30 +11:00
Andrew Tridgell
74b1678d9d - merge from ronnie
- auto-detect CTDB_MANAGES_WINBIND from smb.conf if not set

(This used to be ctdb commit 3d675c7bcedbd483c923df54d1af068758edc206)
2007-11-18 15:14:54 +11:00
Ronnie Sahlberg
b09d3de759 from Christian A
when monitoring that all nfs shares are available, allow both ' ' and 
'\t' characters to separate the exported directory from the options
in /etc/exports

(This used to be ctdb commit ac6cfe9de0acdcf9461068684fa890504454aae4)
2007-11-16 13:37:27 +11:00
Ronnie Sahlberg
9f4b0dab03 only check port 21 when monitoring vsftpd
(This used to be ctdb commit 41b0d71aaee186138eddc97d49503841fa26f234)
2007-11-15 06:56:02 +11:00
Ronnie Sahlberg
dfa6829621 add CTDB_MANAGES_WINBIND to /etc/sysconfig/ctdb to allow ctdb to be used
in environments where samba is used without winbind

(This used to be ctdb commit 1ae5af14f90fd81a20b14c02c0c5ad355a609134)
2007-11-14 16:17:52 +11:00
root
2a70ac8801 the while loop in the startup event runs as a subshell so we need an extra || exit 1 at the end
to propagate the error code back to the caller of the script

(This used to be ctdb commit c30d5c328784059949f5e82a07008e9632234f20)
2007-10-29 12:34:45 +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
ba6f9ae4a7 merge from tridge
(This used to be ctdb commit c7777b966f6a6e0f4126c03300338fdc822ac6c9)
2007-10-29 08:50:51 +11:00
Andrew Tridgell
6d75f0703e added monitoring of ftp ports
(This used to be ctdb commit 4780e078fb55d69053f78a4bbc7c67e569bb5dae)
2007-10-26 14:53:09 +10:00
Ronnie Sahlberg
533a530177 since service nfs stop/start sometimes fail to bring up the mount daemon on rhel5
check if mountd is running during monitoring and if it is not, try to restart it

(This used to be ctdb commit 3d4b74669164b519398aeeacd59714f1e3884eff)
2007-10-23 12:35:43 +10:00
Ronnie Sahlberg
6a32af60b8 nfs may take a while to stop so do it in hte background
(This used to be ctdb commit 2ccaeaf6a65731c17173a4945e3e00e230e67d35)
2007-10-22 15:14:49 +10:00
Ronnie Sahlberg
e4ec6e9d6b flush the route cache when we have added the single public ip to the
node

cleanup and remove everything when we do a shutdown event

(This used to be ctdb commit 221432f45073bc7624803058c8bbf18838e7ceeb)
2007-10-18 14:13:48 +10:00
Ronnie Sahlberg
ebe772b1b2 use $CTDB_BASE in 90.ipmux instead of hardcoding it to /etc/ctdb
(This used to be ctdb commit 6abb46b010851f5719f12273b4a3d46ec986f0c7)
2007-10-11 07:51:57 +10:00
Ronnie Sahlberg
870a57a55b use kill_tcp_connections() to kill off all tcp connections to the
"single public ip" address when we do a recovery

(This used to be ctdb commit 19b52a2d5db31efa9e7c77037097ff8539986ac3)
2007-10-11 07:30:10 +10: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
Ronnie Sahlberg
03e0277e03 send out gratious arps when we are starting up serving the "single
public ip" but before we start the ipmux tool

(This used to be ctdb commit dad1a80f39763314825939095f7656c13dcdbdc3)
2007-10-09 12:00:12 +10:00
Ronnie Sahlberg
292e9d9109 add an initial test version of an ip multiplex tool that allows us
to have one single public ip address for the entire cluster.

this ip address is attached to lo on all nodes but only the recmaster 
will respond to arp requests for this address.
the recmaster then runs an ipmux process that will pass any incoming 
packets to this ip address onto the other node sin the cluster based on 
the ip address of the client host


to use this feature one must
1, have one fixed ip address in the customers network attached 
permanently attached to an interface
2, set CTDB_PUBLI_INTERFACE=
   to specify on which interface the clients attach to the node
3, CTDB_SINGLE_PUBLI_IP=ip-address
   to specify which ipaddress should be the "single public ip address"




to test with only one single client,   attach several ip addresses to 
the client and ping the public address from the client with different -I 
options.   look in network trace to see to which node the packet is 
passed onto.

(This used to be ctdb commit 50d648c95e4e6d7c2867a034c2b550086d853320)
2007-10-08 14:05:22 +10:00
Andrew Tridgell
b87ddd9148 no longer wait at startup for services to become available, instead
set the node initially unhealthy and let the status monitoring bring the node online.
This fixes a problem with winbindd, where it refused to start because secrets.tdb was not populated
but we could not populate ctdbd, because the net command would not run while ctdbd was still doing startup
and thus frozen
(This used to be ctdb commit 3a001b793dd76fb96addf1e2ccb74da326fbcfbc)
2007-09-24 10:00:14 +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
9cf96a5e4c nicer use of testparm
(This used to be ctdb commit a611ea930fb9dae6e56f6a74b2bdc9e08066d4d1)
2007-09-14 09:24:34 +10:00
Andrew Tridgell
2f86c3f827 ensure smbd and winbindd do die in 50.samba
(This used to be ctdb commit 6f23affedb626fc7a5ca86c4763f3045a5586231)
2007-09-13 14:36:23 +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
50381480eb update a comment
(This used to be ctdb commit e7d3ef4443686529299e8f293398cc0522235627)
2007-09-10 07:45:57 +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
fa872de664 60.nfs:
we must always restart the lockmanager when the cluster has been 
reconfigured and ip addresses has changed. This is to make sure we get a 
clusterwide grace period for nfs locking.
if we dont do this and only restart locking on the nodes that were 
direclty affected, a different client can take out a conflicting lock 
from a different node before affected clients has had a chance to
reclaim all the locks lost during reconfigure.
grace period on rhel5 kernel has bene increased to 90 seconds!

statd-callout:
we must restart lockmanager to ensure a clusterwide grace period for 
nfs. this makes locking "more correct" for nfs clients and prevents
other clients/nodes from taking out a conflicting lock while a different
client/node tries to reclaim lost locks.
This makes it "almost consistent" for NFS clients   but there is still 
the possibility that a cifs client can take out a conflicting lock 
before an nfs client has had a chance to reclaim an existing lock.
This can not be solved with anything less than making the kernel nfs 
lock manager "samba aware" and making samba aware of the internal state 
of the kernel lock manager so that they can cooperate.

we can not just stop/start the lockmanager back to back in rhel5 since 
if they are stopped/started too close to eachother then when the new 
lockmanager upon starting up sends out statd notifications two things 
can happen:
1, new lockmanager sends out notification BEFORE it has registered with 
portmapper leading to 
  lockmanager starts
  lockmanager sends notification to the client
  client tries to recover the lock and tries to portmap the lockmanager
  port on the server.
  server is not (yet) registered with portmapper and server responds
  "no such program" to hte clients request to discover where lockmanager
   is.
  client then just completely gives up reclaiming the lock and doesnt 
  even reattempt the portmapper call after some timeout.
  ==> lock reclaim failed.
2, if they are started back to back, and a client tries to reclaim the
   lock  the lockmanager sometimes sends two responses back to back
   to the client.   one with status NLM_GRANTED (==you got the lock 
reclaimed) and one with status NLM_DENIED (==you could not get the lock 
reclaimed)
   This confuses the client and leads to the server thinking that the 
client does have the lock   and the client thinking it has not got the 
lock    and orphaned locks result.


We also send out additional notification messages of different formats
to allow more legacy clients to interoperate with locking.

(This used to be ctdb commit 13208c1aab2942e28dff87e38e6794bf0c026033)
2007-09-07 08:52:56 +10:00
Ronnie Sahlberg
00453a375a improve the handling of hosts to notify with statd
(This used to be ctdb commit cc87bda7e344bc777b9620a6211e62de4dce4e3b)
2007-09-06 11:30:49 +10:00
Ronnie Sahlberg
46eecfea27 we dont use 'sendip' any more so dont check for it and exit from the
61.nfstickles script if it is missing from the host

(This used to be ctdb commit 8eac441e24f4ef33b55f9eaa4856b5c1e1c15213)
2007-09-05 15:39:51 +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