summaryrefslogtreecommitdiffstats
path: root/ctdb/config/functions
Commit message (Collapse)AuthorAgeFilesLines
...
* Event scripts: Respect CTDB_MANAGES_NFS and add function log_status_cat.Martin Schwenke2009-11-251-0/+6
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5d97c07be13a8209a81dfc8f73e49371949e4dc3)
* More eventscript cleanups. Initial smoke testing seems OK.Martin Schwenke2009-11-251-123/+43
| | | | | | | | | | Apart from lots of cleanup work, this also fixes a bug where the share checks didn't used to cope with directory names containing spaces. The previous commit also loaded the config incorrectly. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3c93336ab92c2e4829ff4dc360045bfa6df21d50)
* Now vaguely tested initscript updates.Martin Schwenke2009-11-191-8/+12
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f1e350f9edb74cc44b6c5be4c062fd93e98ba8c4)
* More untested eventscript factorisation.Martin Schwenke2009-11-191-15/+20
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ac655b0a65b32d809d47fec9821f7f31bb2fe2a7)
* Eventscripts: Untested factorisations and introduction of status event.Martin Schwenke2009-11-131-38/+162
| | | | | | | | | | | | | This is the first stage of an experimental change to eventscripts. Ronnie and I did a few hours of factorisation of 40.vsftpd and applied many of the changes to 41.httpd. Other eventscripts were also modified. At this stage this is completely untested. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 364e70b763f0ccd7714d15723ad3ea4d7e2968a1)
* sugegstion from metze,Ronnie Sahlberg2009-11-061-2/+2
| | | | | | | | use killtcp and kill both directions of the nfs connections. we used to kill only one direction since the other direction was unkillble but recent kernels allow us to kill both (This used to be ctdb commit 8001ae580bcc28d45f6026b529d7ffc247cbba34)
* add a direcotry where multiple local scripts can be added to run when ↵Ronnie Sahlberg2009-10-191-0/+6
| | | | | | executing eventscripts (This used to be ctdb commit 27d152a918680a59c7412aec7e1772f25b72d469)
* Clean up ctdb_check_directories* eventscript functions.Martin Schwenke2009-10-121-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | There are 2 problems with this code: * The loop in ctdb_check_directories_probe() breaks on filenames containing whitespace. The fix to protect them is to pass "$@" to this function and have it operate on "$@". Note that there's still a problem with whitespace in filenames in the 50.samba eventscript. To fix this ctdb_check_directories_probe should read the filenames from stdin. Another time... * The check for '%' in filenames in ctdb_check_directories_probe() ends up involving several forks. On a modern machine this can cost a couple of minutes when checking a large number of directories. The fix is to use a case statement. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit eb1fecaef9aa5cb85dff7d4f7af8a9878deabed8)
* 40.vsftpd monitor event only fails after 2 failures to connect to port 21.Martin Schwenke2009-09-301-0/+34
| | | | | | | | | | | | | | | | | | | | Change the monitor event in 40.vsftpd so it only fails if there are 2 successive failures connecting to port 21. This reduces the likelihood of unhealthy nodes due to vsftpd being restarted for reconfiguration due to node failover or system reconfiguration. New eventscript functions ctdb_counter_init, ctdb_counter_incr, ctdb_counter_limit. These are used to count arbitrary things in eventscripts, depending on the eventscript name and a tag that is passed, and determine if a specified limit has been hit. They're good for counting failures! These functions are used in 40.vsftpd and also in 01.reclock - the latter used to do the counting without these functions. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit cfe63636a163730ae9ad3554b78519b3c07d8896)
* Revert "try to restart statd everytime it fails, not just the first time"Ronnie Sahlberg2009-09-151-1/+1
| | | | | | This reverts commit 4f7b39a4871af28df1c4545ec37db179fa47a7da. (This used to be ctdb commit db7b96304e4725f29b12398b7582e385daed63ed)
* try to restart statd everytime it fails, not just the first timeRonnie Sahlberg2009-09-151-1/+1
| | | | (This used to be ctdb commit 4f7b39a4871af28df1c4545ec37db179fa47a7da)
* Rename the CTDB_INIT_STYLE "ubuntu" to "debian" - this is where it comes from.Michael Adam2009-09-091-1/+1
| | | | | | Micheal (This used to be ctdb commit b060911683d8ac201806d35a505867fe3ba9519f)
* From : Flavio Carmo Junior <carmo.flavio@gmail.com>Ronnie Sahlberg2009-05-191-0/+36
| | | | | | | | Add a helper function that checks whether a unix domain socket exists and there is a daemon LISTENING to it similar to the existing function to check for a daemon LISTENING to a tcp/ip socket. (This used to be ctdb commit 025a836ab3be3c078fccd8c10b10dfffbfdd94d0)
* create a function "remote_ip" which can be used from scripts to remove a ↵Ronnie Sahlberg2009-04-081-0/+25
| | | | | | | | single ip from an interface. use this fucntion from the natgw eventscript (This used to be ctdb commit feab5f30b2d6cebf4dd28abc5a81f93424a4c852)
* create a varient of kill_tcp_connections that only kills off the local side ↵Ronnie Sahlberg2009-03-241-0/+42
| | | | | | of a connection (This used to be ctdb commit dc2f28f7c988364b5d45f3048be4db3e5ff113b3)
* use netstat to check first and only fall back to netcat if netstat is ↵root2009-02-051-5/+5
| | | | | | unavailable (This used to be ctdb commit dfb16ce9ed65048d30109851737a9075d071ecdb)
* ctdb_check_tcp_ports: correctly detect listeners on ipv6 :::<port> w/out netcatMichael Adam2009-01-301-1/+5
| | | | | | | | | The netstat test only grepped for the ipv4 wildcard address. Now the ipv6 wildcard listener is correctly detected as well. Michael (This used to be ctdb commit 78e7928797e239e71f96eb001460a0dbf943e18f)
* ctdb_check_tcp_ports: fail the check if neither netstat nor netcat/nc is foundMichael Adam2009-01-301-0/+4
| | | | | | Michael (This used to be ctdb commit 25d04bbe9528fafc68751f7beb22daeee3163d34)
* ctdb_check_tcp_ports: cope with multiple locations of netcat or ncMichael Adam2009-01-301-8/+24
| | | | | | | | | | | | | This fixes tcp port monitor events on systems, where netcat or nc is not found in /usr/bin/, Debian, for instance. The patch also separates the process of finding the binaries and calling them, moving the detection outside of the loop over the ports list. Michael (This used to be ctdb commit 3adf100e7f0c04aaf2da9ae4c6984cdb708c3b57)
* funcions: make (nice_)service a noop for empty service nameMichael Adam2009-01-161-0/+8
| | | | | | Michael (This used to be ctdb commit 4cac2a16b70be772e4f1520020762f63c0bf3efe)
* functions: add detect_init_style().Michael Adam2009-01-161-0/+14
| | | | | | Michael (This used to be ctdb commit ab34a9480b59c649a4fc73a466c8ca0975453ed9)
* skip directories containing macros (%) in ctdb_check_directories_probeMichael Adam2008-12-161-0/+1
| | | | | | | | | This prevents the monitor action of 50.samba from failing on e.g. a typical [homes] service with "path = /home/%S" . Michael (This used to be ctdb commit 023d6c2e3017d323b5a70f987f3b4e0b8b8f0f7b)
* When we harvest all tcp connections to kill off after a takeip/releaseip ↵Ronnie Sahlberg2008-08-201-0/+1
| | | | | | event we must also harvest the ipv4 connections which may be presented in ::ff:xxxx:xxxx form by netstat (This used to be ctdb commit 293d12a40501320a21efaf592b8f20e8590a5197)
* update the socketkiller in the eventscripts to be able to handle ipv6Ronnie Sahlberg2008-08-201-5/+8
| | | | (This used to be ctdb commit 6da7b36b7ccc4ee9b809867ea32036f09a801bb3)
* ensure we use killtcp on non-NFS/non-CIFS ports for faster failover ofAndrew Tridgell2008-08-011-1/+9
| | | | | | other protocols (This used to be ctdb commit aefcb1f817581ac8cd67712d07159fc802f96623)
* allow for probing of directories without raising an errorAndrew Tridgell2008-07-231-6/+19
| | | | (This used to be ctdb commit 8fed021d11160b137f4140ea02947347250e2959)
* mark /etc/ctdb/functions as a config file to keep rpmlint happyRonnie Sahlberg2008-07-091-1/+0
| | | | (This used to be ctdb commit 8f6cd88e74de24af8dde2b6cabb2348c4f914b99)
* Replace \s with [[:space:]] in our regexps we use for egrep.Ronnie Sahlberg2008-07-091-4/+4
| | | | | | | | | | Kevin Collins noticed that RHEL5 grep-2.5.1-54.2.el5 built for x86 does not handle \s while the exact same RHEL5 package for amd64 does! [[:space:]] is more portable. Even across the same package version ( different architecture ) from the same vendor :-) (This used to be ctdb commit fd7bb21c4f9289fc34a57f9d8cb7c13a02d06096)
* make /etc/ctdb/functions executable and add a hashbang to it soRonnie Sahlberg2008-06-271-0/+1
| | | | | | rpmlint wont complain (This used to be ctdb commit 9b8179ad043a80e0e18eeba427a7b7b15690d039)
* shell scripts need extra spaces sometimeRonnie Sahlberg2008-04-101-1/+1
| | | | (This used to be ctdb commit f6409b19972fa94257af9aa51def539f639bc226)
* add possibility to provide site local modifications to the event systemRonnie Sahlberg2008-04-101-0/+8
| | | | | | through a /etc/ctdb/rc.local script that is sources by /etc/ctdb/functions (This used to be ctdb commit a5b7dd97e3faf0c4f289240307d0e22a67cf2353)
* from Mathieu PARENT <math.parent@gmail.com>Ronnie Sahlberg2008-02-131-0/+13
| | | | | | Simulate "nice service" on systems that do not have "service" (This used to be ctdb commit d0e6dcbadaf41745d423640e5ff5bafd9f68eb88)
* add helpers to stop/start nfs lockmanager on different platformsRonnie Sahlberg2008-02-111-0/+42
| | | | (This used to be ctdb commit 3b797d851bd4bdb8ec2b3981061c668d2cf0f97c)
* create a startstop_nfs function that can start/stop the nfs service of ↵Ronnie Sahlberg2008-02-111-0/+41
| | | | | | different platforms (This used to be ctdb commit f6cc6bd1f62138fbf812d1917f7341e2fa2323da)
* dont use absolute pathnames for the netstat toolRonnie Sahlberg2008-02-071-2/+6
| | | | | | it can be either in /bin or /usr/bin (This used to be ctdb commit 4ab09e90a8a81b26d2e2af168cfce3c49a98c0e5)
* the event scripts no longer need to show a date, as its done by the main ↵Andrew Tridgell2008-01-161-15/+15
| | | | | | ctdbd logging function (This used to be ctdb commit b5e691c4c3fe80b219a9ac355d28b766cb0303f3)
* move the kill_tcp_connections() function from 10.interfaces to functionsRonnie Sahlberg2007-10-111-0/+40
| | | | (This used to be ctdb commit 055948530fb16bf49c42fc4489f29a21665156c0)
* cope with non-standard install dirs in event scriptsAndrew Tridgell2007-09-141-2/+2
| | | | (This used to be ctdb commit 52fff5345873690a9cc86495f414343eaa3bd540)
* remove more cruft from the logsAndrew Tridgell2007-09-131-3/+3
| | | | (This used to be ctdb commit b67f35c483b6cbb5facaa6380c7794709f44213a)
* remove clutter from ctdb log fileAndrew Tridgell2007-09-131-3/+3
| | | | (This used to be ctdb commit 54d5dcaaee0498f40bbee5059cc72d0ca75d33b7)
* try netstat as a last attempt to check a tcp port in Ronnie Sahlberg2007-07-151-0/+2
| | | | | | ctdb_check_tcp_ports() as well (This used to be ctdb commit ad0292726f9cfc8afe3733b30ac2d5621e9a48f1)
* if we dont have nc or netcat, try using netstat as a final attempt to Ronnie Sahlberg2007-07-151-1/+3
| | | | | | | | check for tcp ports (the check for these tools should not really use hardcoded paths) (This used to be ctdb commit 56d77082c07a519dd3804cc24cc7ba889b8469ff)
* if we dont have /etc/sysconfig and we dont have /etc/defaultRonnie Sahlberg2007-07-151-0/+2
| | | | | | check /etc/ctdb/sysconfig as a last option (This used to be ctdb commit 1043929ceb0cd04ab6466e9a5d7d52f9af1cb8e8)
* when we have found that /etc/rc.d/init.d/SERVICE exists, then run that Ronnie Sahlberg2007-07-151-1/+1
| | | | | | script and not /etc/rc.d/SERVICE (This used to be ctdb commit 7f0c3a02ef11fd19c8cd5116fd451ebd10ba5d1b)
* added --nosetsched option to ctdbdAndrew Tridgell2007-07-131-0/+1
| | | | (This used to be ctdb commit 4cbbb88c1735c7d112e751e22da1c1c69e09bf4a)
* check winbind in monitoring event tooAndrew Tridgell2007-06-171-0/+14
| | | | (This used to be ctdb commit bccba656c21d0edbd9840401a3c43a76b1b3bc05)
* - wait for winbind on samba startAndrew Tridgell2007-06-171-2/+24
| | | | | | - use $PATH for ctdb status (This used to be ctdb commit cf8d837cead1cbcb22c71ebbc3947970d1a565a3)
* - added monitoring of rpc ports for nfs, and of Samba ports and directoriesAndrew Tridgell2007-06-061-2/+58
| | | | | | | | - 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)
* make the init scripts more portable about location of system config filesAndrew Tridgell2007-06-031-0/+11
| | | | (This used to be ctdb commit 65f3e2bc722e314b2c51c3bfdc544b408a8a64cf)
* move config files to config/ directoryAndrew Tridgell2007-06-021-0/+75
(This used to be ctdb commit f95de519b885c8e1f40df0cda70fd796e479a22a)