summaryrefslogtreecommitdiffstats
path: root/ctdb/config
Commit message (Collapse)AuthorAgeFilesLines
...
* eventscripts: Remove reconfigure check from samba and winbind eventscriptsMartin Schwenke2013-10-222-4/+0
| | | | | | | | | There is no reconfigure code for these scripts so no need to check for reconfiguration. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 41df1637c1d8a7b2f5a9974408db71b1f74cb2f2)
* eventscripts: Remove reconfigure code from httpd eventscriptMartin Schwenke2013-10-221-7/+0
| | | | | | | | | Nothing ever (or has ever) set the "needs reconfigure" flag, so this code is unnecessary. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5b77fd95bda5f1960aca952e1b759231890b56f3)
* eventscripts: Fold ctdb_check_tcp_ports_ctdb() into ctdb_check_tcp_ports()Martin Schwenke2013-10-221-50/+16
| | | | | | | | | A generic framework is no longer needed now that the "ctdb" checker is the only one left. Simplify the code. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 044d302b41a2040642355401e3236fcecc3a620a)
* eventscripts: Remove TCP port checks other than the built-in CTDB oneMartin Schwenke2013-10-221-69/+1
| | | | | | | | | | | "ctdb checktcpport" is no longer experimental so the other checkers are no longer required. Remove tests related to the removed checkers. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 50e330d0679614bee2e7bab028436e929f74ca50)
* scripts: Remove setting of PATH from functions fileMartin Schwenke2013-10-221-2/+0
| | | | | | | | | | | | | | | | The current setting is inconsistent with settings on most systems, putting /bin before /sbin. Use of /usr/local/bin, which may be required on some systems, is also overridden. This can make it difficult to do interactive debugging of script problems. Rely on the system PATH instead. If system-specific changes need to be made then this can be done in a configuration file. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit cfbff39e22e42f3997f637290748290833525714)
* eventscripts: Clean up 20.multipathdMartin Schwenke2013-10-221-57/+44
| | | | | | | | Reduce the complexity, including the depth of background processes. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 49f077c475b078889ff0492fe7d567a64d6cb87c)
* eventscripts: NAT gateway script should export CTDB_NATGW_NODESMartin Schwenke2013-10-221-1/+2
| | | | | | | | | | Otherwise calls to "ctdb natgwlist" will not behave as expected if a non-standard file is used, since that command will use the default file location. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e574b30257126679704b088c4334a8e7a53a9c3f)
* scripts: Simplify script_log() to just look at CTDB_SYSLOG variableMartin Schwenke2013-10-221-6/+1
| | | | | | | | | The old logic was actually wrong. If CTDB_LOGFILE is unset then a default is used, not syslog. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 79e2029f9bc078126e865aa715100a3870c7604b)
* scripts: Remove support for CTDB_OPTIONS configuration variableMartin Schwenke2013-10-223-18/+8
| | | | | | | | | | | Allowing people to put random options in CTDB_OPTIONS complicates some logic (particularly around use of syslog). If we're going to have variables for options then let's make sure we have a variable for each option and make people use them. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e55f3a1577eff0182802b0341d865d961aeae1c7)
* scripts: Remove unused configuration variable CTDB_MANAGES_SCPMartin Schwenke2013-10-221-1/+0
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit bda0da41aaf629a252cc361b73ebc5328f26ed04)
* eventscripts: Deprecate NFS_SERVER_MODE, use CTDB_NFS_SERVER_MODE insteadMartin Schwenke2013-10-223-3/+3
| | | | | | | | All CTDB configuration variables should start with CTDB_. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f12658aff125996ae45eea23241d8c3d0567b893)
* eventscripts: Fix comment - CTDB_TCP_PORT_CHECKS -> CTDB_TCP_PORT_CHECKERSMartin Schwenke2013-10-221-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 0a79ba2f1277a776347e2c3f04ce8419e0be62de)
* scripts: Add support for optional ctdbd.conf configuration fileMartin Schwenke2013-09-251-0/+7
| | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 8f660d0dd52013e5876806be908e8e603aa6e968)
* eventscripts: Load CTDB configuration settings in 70.iscsiAmitay Isaacs2013-09-231-0/+2
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit ff41ce5ef202f8f6342e285d195bb5df61d848ce)
* eventscripts: Clean up monitoring of system memory in 00.ctdbMartin Schwenke2013-09-111-30/+41
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 16fcff0d1993b7a0479341862ea44d10bd5c6d6d)
* eventscripts: Avoid using a temporary file in 62.cnfsMartin Schwenke2013-08-221-4/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 81833052d7ee8f76b1e98376a0273448640cfa8e)
* scripts: Remove gdb_backtraceMartin Schwenke2013-08-221-87/+0
| | | | | | | | | This uses potentially insecure temporary files and is not referenced anywhere else. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4b914d7e217202f3d11a8e95f9f74bc17869475b)
* eventscripts: Become unhealthy faster on nfsd failureMartin Schwenke2013-08-141-3/+2
| | | | | | | | | | | | | | | | | Anecdotal evidence suggests that most nfsd RPC check failures are due to cluster filesystem or storage problem. Apparently these are rarely helped by attempting to restart the NFS service because the restart tends to hang. Fail after 2 nfsd RPC check failures, instead of waiting for 6 failures. Restart on every 10th failure to try to bring the node back to good health. Update unit tests to match. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e9ef93f7b6dad59eabaa32124df81f3e74c651ef)
* eventscripts: Improve message logged when a counter hits a limitMartin Schwenke2013-08-141-1/+1
| | | | | | | | | It should print the actual number of consecutive failures rather than the limit. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ff5f0d1e29af2b293e30cdc54bed03a644be7038)
* eventscripts: Print a message when waiting for TCP connections to be killedMartin Schwenke2013-08-141-1/+4
| | | | | | | | This makes the gaps in the logs more obvious. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 11fbf4789d783dd0bac22754b374dd9ea4b03bad)
* eventscripts: New configuration variable $CTDB_RPCINFO_LOCALHOSTMartin Schwenke2013-08-142-1/+8
| | | | | | | | | | Passing "localhost" to the rpcinfo command causes overheads, like reading /etc/services multiple times. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1d61988af9e4fa3621a3e2d06a859bcb53df2d67)
* eventscripts: Add modulo (%) operator to ctdb_check_counter()Martin Schwenke2013-08-141-7/+12
| | | | | | | | Also add it to the corresponding eventscript unit test infrastructure. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f4ef83a256f59eeb00b9a5bc10c28347e1ad1031)
* eventscripts: Separate out RPC service restart codeMartin Schwenke2013-08-141-41/+56
| | | | | | | | | | | | | | | | | | While doing this: * Explicitly assign RPC program and version information in _nfs_check_rpc_common(). This is more lines of code but is easier to read. * Don't print the options when starting a service. Trying to print it makes the code messy for little benefit. Update the eventscript unit testing code and a Ganesha test to reflect this. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e8b531405665885196c95fe1608db33a255bf761)
* eventscripts: Remove support for RPC service 'q' and 's' restart flagsMartin Schwenke2013-08-144-4/+4
| | | | | | | | They're hard to maintain and provide very little benefit. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1a1be43f8466d46913dcdfe6dcedb94316cd28ad)
* eventscripts: When restarting the nfslock service only show output of startMartin Schwenke2013-08-141-2/+2
| | | | | | | | | | | That is, /dev/null the "stop" output. This is consistent with the way CTDB generally deals with the output when stopping a service. It also makes updating the eventscript unit tests easier. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c7332526b1b488abefeb4be78a7cd3f2f9abc451)
* scripts: Do not run ctdb tool commands when debugging hung "init" eventMartin Schwenke2013-08-091-2/+6
| | | | | | | | | | | | CTDB daemon is not ready to accept clients in INIT runstate (init event). CTDB daemon will start accepting connections in SETUP runstate (setup event) and later. Also, minor log formatting changes. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 81d7ce03b28d592a1337639e14d9ea141e20bfff)
* eventscripts: Use configured RECLOCK file instead of asking CTDBAmitay Isaacs2013-08-091-7/+5
| | | | | | | | | | | On cluster where recovery lock file is not being used, asking CTDB daemon is unnecessary overhead. And if CTDB is using recovery file, then changing configuration without restarting is *stupid*. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Pair-Programmed-With: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 44eb86e6042adb6efe75d2a5528b82a0f21d496d)
* initscript: The wrapper script should export CTDB_SOCKETMartin Schwenke2013-07-291-0/+2
| | | | | | | | | | | | | | This ensures that any invocation of the ctdb tool (within the wrapper) gets the desired value. This at least ensures that ctdbd will be started. If a non-standard value is set for CTDB_SOCKET then command-line users will still need the variable in their environment. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 37ccc7c6cc43a80aaa92291aea7a438f4225488a)
* eventscripts: kill_tcp_connections() should send connections to stdinMartin Schwenke2013-07-291-11/+14
| | | | | | | | | | | | | | | This avoids issuing multiple "ctdb killtcp" commands to terminate tcp connections, one per connection. This will considerably reduce the time when there is a large number of tcp connections. This also makes it possible to avoid calling "ctdb killtcp" when there are no connections. Add a couple of unit tests for killtcp and update eventscript unit test infrastructure to support. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit a20d94717d2e4ab866d8a002cdf39c0669b74c6a)
* scripts: Run scriptstatus for hung eventMartin Schwenke2013-07-291-2/+17
| | | | | | | | | | | | | | The timeout information printed by ctdbd is less than useful because it refers to the cumulative time taken by the eventscripts run so far. Adding scriptstatus output indicates where time was actually spent. Since there is now quite a bit of output, serialise the calls to this script using flock. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 1b016b2dfc5d7d3f2a42ce4dfe569608e90eb714)
* eventscripts: A missing interface should cause monitoring to failMartin Schwenke2013-07-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | A missing interface is at least as bad as an interface with a link that is down so should have a similar effect. This couldn't be done previously because orphaned interfaces used to be listed for monitoring. This was worked around in 10.interface in commit 49b2d1bd9554461ed8edbfc21e777c0eca9e1443 and fixed in ctdbd in commit cc1a3ae911d3fee8b87fda5de5ab6d9499d7510a. If $CTDB_PARTIALLY_ONLINE_INTERFACES="yes" then monitoring won't actually fail but the interface is still marked as down. While we're touching this code, use "ip link" instead of "ip addr". It is marginally cheaper but not enough for a separate patch. ;-) This effectively reverts d67955b42f7627be9dae995230c8fcbb8a948ec2. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 501f19b16fd6d67fbb754248868c38ee5bcf79ef)
* eventscripts: Get list of configured interfaces using "ctdb ifaces"Martin Schwenke2013-07-191-3/+3
| | | | | | | | | | This was previosuly changed because ctdbd didn't garbage collect orphaned interfaces. This was fixed in commit cc1a3ae911d3fee8b87fda5de5ab6d9499d7510a. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c6ab0f9405d5fa5b0b1693bc92e59da0d555a9d7)
* scripts: ctdbd_wrapper logs a message to syslog if syslog is not being usedMartin Schwenke2013-07-111-0/+8
| | | | | | | | | It can be very disconcerting when logging to syslog is expected but nothing is being logged there. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 412bc0e20bef694d4e911dc9c984fd7716231f1f)
* packaging: Add systemd supportMartin Schwenke2013-07-101-0/+15
| | | | | | | | Based on an original patch by Sumit Bose <sbose@redhat.com>. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e43a4b7b69a21c4cec2453dcac436b64bf5d7f06)
* initscript: Simpify initscript and control CTDB via new ctdbd_wrapperMartin Schwenke2013-07-102-226/+329
| | | | | | | | | | | | | | | Currently the initscript is very complex. This makes it hard to read and hard to add support for new init systems, such as systemd. Create a wrapper called ctdbd_wrapper to be installed alongside ctdbd. This is called by the initscript to start and stop ctdbd. It does the ctdbd option construct and waits until ctdbd is properly initialised before it exits. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit e3abc7eebab5cceddc4ce7817890dd5db9be3450)
* initscript: Export CTDB_DEBUG_LOCKS variableAmitay Isaacs2013-07-101-1/+1
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit a415a1986900135f889efc25ecaf2761b1dae81a)
* scripts: Add an example debug_locks.sh script to debug locking issueAmitay Isaacs2013-07-101-0/+45
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit c711ff4702c5f95b75e4bf030665fc2afffc2f9e)
* eventscripts: New configuration variable $CTDB_SKIP_GANESHA_NFSD_CHECKMartin Schwenke2013-07-051-1/+3
| | | | | | | | | This allows 60.ganesha to be unit tested, except for the core Ganesha monitoring code. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f606df4f2db754592e6d1a16c26e155cacb2beef)
* eventscript: Move Ganesha nfsd monitoring to a functionMartin Schwenke2013-07-051-51/+59
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ceb5b2d37f7ab4894908ec26f3812b3bed991525)
* eventscripts: Drop RPC service version from nfs_check_rpc_service() callsMartin Schwenke2013-07-051-2/+2
| | | | | | | | | | | Support for this was removed in commit 77302dbfd85754e02559eccb2dd6c090db0b6b9f and I overlooked its use in 60.ganesha. Signed-off-by: Martin Schwenke <martin@meltin.net> Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 520914e7ee1b879c1080e5857fda18ed5b973fd6)
* eventscripts: When replaying monitor status, don't log empty outputMartin Schwenke2013-07-051-1/+3
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ce04f1c107b4392ca955d9f29b93aaaae62439ce)
* eventscripts: "setup" event doesn't need to wait for SETUP runstateMartin Schwenke2013-06-201-15/+0
| | | | | | | | | The "setup" event isn't called until ctdbd is in CTDB_RUNSTATE_SETUP anyway... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9ea57af557028b1d2e5c560e7bcf4d014b9a8b1e)
* eventscripts: 13.per_ip_routing should not try hard to find public_addressesMartin Schwenke2013-06-201-1/+1
| | | | | | | | | | | | | This essentially reverts d4621277240721e6d130a930b0100506b64467ea. This was added for testing but the test code was actually broken. CTDB itself will only process public IPs if $CTDB_PUBLIC_ADDRESSES is set, so no code should try to be more flexible than that! The test code has been fixed instead. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3b11b27f3e22e99947bc2d6c49c4427bd7a0e332)
* scripts: Move TDB checking from initscript to "init" eventMartin Schwenke2013-06-202-98/+95
| | | | | | | | | It makes sense to do this in the "init" event and make the initscript less complicated. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3bc93f312b8464fbfa2b2c44fffedc591fe5a3e0)
* scripts: Move dropping of all IPs from initscript to "init" eventMartin Schwenke2013-06-202-4/+4
| | | | | | | | | It makes sense to do this in the "init" event and make the initscript less complicated. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 0b77cceb49a30a181063adc7868d42d2851318e8)
* scripts: drop_ip() should use delete_ip_from_iface()Martin Schwenke2013-06-201-1/+1
| | | | | | | | | Otherwise secondary addresses that aren't owned by CTDB could be dropped. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5ffce65a1ad659b198ddf647622b899bdde45c72)
* scripts: drop_all_public_ips() now prints messages to stdout, not logMartin Schwenke2013-06-203-11/+5
| | | | | | | | Change all callers to maintain current behaviour. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 0b67397ef5419c781a35916575151da7b7e7cc27)
* eventscripts: New configuration varable $CTDB_NFS_DUMP_STUCK_THREADSMartin Schwenke2013-06-142-0/+30
| | | | | | | | | | | If some nfsd threads are still alive after a shutdown during a restart then this indicates the maximum number of threads for which a stack trace should be dumped. This can be useful for trying to determine why nfsd is stuck. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2503245db10d567af708a04edd3a3b488c24f401)
* eventscripts: Add new option $CTDB_MONITOR_NFS_THREAD_COUNTMartin Schwenke2013-06-132-0/+38
| | | | | | | | | | | | | | | | | | Consider the following example: 1. There are 256 nfsd threads configured. 2. 200 threads are "stuck" in system calls, perhaps waiting for the underlying filesystem when an attempt is made to restart NFS. 3. 56 threads exit when NFS is stopped. 4. 56 new threads are started when NFS is started. 5. 200 "stuck" threads exit leaving only 56 threads running. Setting this option to "yes" makes the 60.nfs monitor event look for this situation and try to correct it. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 99b0d8b8ecc36dfc493775b9ebced54539c182d2)
* eventscripts: Fix statd-callout update handlingMartin Schwenke2013-05-283-31/+20
| | | | | | | | | | | | | | 60.nfs and 60.ganesha touch $statd_update_trigger every time they're run. This stops the statd-callout updates from ever being called. Make this logic self-contained and move it to new function nfs_statd_update() in the functions file. Call this in 60.nfs and 60.ganesha with the appropriate update period as the only argument. Signed-off-by: Martin Schwenke <martin@meltin.net> Reported-by: Poornima Gupte <poornima.gupte@in.ibm.com> (This used to be ctdb commit 1b5968f6be084590667f4f15ff3bef13ed9a2973)