summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | 00.ctdb eventscript removes all files from $ctdb_active_dir.Martin Schwenke2011-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this you can get into a situation where ctdbd can not start. If the active file for a service exists but the service is not running, then trying to stop the service may fail, causing the eventscript to exit from ctdb_start_stop_service(). Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 28379ca0f747c5952d690a451834ce7421adfd34)
| * | | Merge remote branch 'martins/eventscript.20.multipathd'Ronnie Sahlberg2011-08-101-8/+3
| |\ \ \ | | | |/ | | |/| | | | | (This used to be ctdb commit abe67d6af1e0594641b98facc3534059263e1745)
| | * | Merge branch 'eventscript.62.cnfs' into eventscript.20.multipathdMartin Schwenke2011-08-102-10/+8
| | |\ \ | | | | | | | | | | | | | | | (This used to be ctdb commit fb87fa9273db4f82e801a331b5d95059d64dfb8e)
| | * | | Evenscripts: update 20.multipathd to use ctdb_setup_service_state_dir.Martin Schwenke2011-08-091-8/+3
| | | |/ | | |/| | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 797ca65bdd59b14325ffd32b4d4140e9b01dbe71)
| * | | Merge remote branch 'martins/eventscript.62.cnfs'Ronnie Sahlberg2011-08-101-9/+5
| |\ \ \ | | | |/ | | |/| | | | | (This used to be ctdb commit b8493ceb35b125a390b1e83464fb9ff72f2e1495)
| | * | Merge branch 'eventscript.13.per_ip_routing' into eventscript.62.cnfsMartin Schwenke2011-08-101-1/+3
| | |\ \ | | | | | | | | | | | | | | | (This used to be ctdb commit cfa4102ec0d97e1d1d3c1ce6407ffacdb85c2e10)
| | * | | Evenscripts: update 61.cnfs to use ctdb_setup_service_state_dir.Martin Schwenke2011-08-101-9/+5
| | | |/ | | |/| | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit afafeb1fb12384bddff470d38b534f513a1f3b07)
| * | | Merge remote branch 'martins/eventscript.13.per_ip_routing'Ronnie Sahlberg2011-08-103-9/+87
| |\ \ \ | | | |/ | | |/| | | | | (This used to be ctdb commit 20984a28d9617c0b7a5868057594920ed3f1a2c7)
| | * | Evenscripts: update 13.per_ip_routing to use ctdb_setup_service_state_dir.Martin Schwenke2011-08-091-1/+3
| | |/ | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 18e0236754507a9475653f04bb239c5d46ba51de)
| | * Scripts: add note about not using absolute command paths to README.Martin Schwenke2011-08-091-3/+10
| | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 87e6a4a23a6ae6c276e9628ce513663f47b4ee77)
| | * Add a README to the config/ subdirectory.Martin Schwenke2011-08-091-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | This includes a comment about using POSIX Bourne shell, including a suggestion not to use "local" variables. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5ae002c7513b1b2aa5136437a1a19f8cd179b869)
| | * Eventscript functions: new function ctdb_setup_service_state_dir().Martin Schwenke2011-08-091-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be used by eventscripts to create a per-service directory for their own state data. $service_state_dir is set to point to the new directory. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a273554791c2a5281aee28f8e2be0c514e14c91e)
| | * Eventscript functions: new functions to remember/check if service managed.Martin Schwenke2011-08-091-8/+38
| | | | | | | | | | | | | | | | | | | | | | | | This was done ad hoc and was badly named. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9a084a121f629b2c1bcefc1e4c4a4a5cacf53987)
| | * Merge branch 'test_suite' into ronnie_targetMartin Schwenke2011-08-095-91/+43
| | |\ | | | | | | | | | | | | (This used to be ctdb commit 414c4d8e901353a3529f82746ffe2e4983a155d6)
| | * \ Merge branch 'eventscript_tests' into ronnie_targetMartin Schwenke2011-08-0982-8/+2425
| | |\ \ | | | | | | | | | | | | | | | (This used to be ctdb commit 432e6c1d5137142ce6b0314a965747524406c17e)
| * | \ \ Merge remote branch 'martins/eventscript_tests'Ronnie Sahlberg2011-08-1082-8/+2425
| |\ \ \ \ | | | |/ / | | |/| | | | | | | (This used to be ctdb commit ac164a0d731fc5d46ab7d05112484c45ecb21100)
| | * | | Tests - Disable the Samba and NFS eventscript tests.Martin Schwenke2011-08-0823-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They're broken and not worth fixing without infrastructure changes so disable them by taking away the execute bit. This is somewhat easier than trying to merge in all the other tests but not these ones. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 151151353e58f59b15be9313e22b7d4f71ee0de8)
| | * | | Tests - Tweak 10.interfaces 802.ad bonding test to work with current code.Martin Schwenke2011-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d3271d316f6d1561e66cbc4cc1b1e8af63895459)
| | * | | Scripts: remove absolute paths from interface_modify.sh.Martin Schwenke2011-08-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "ip" command is currently run as "/sbin/ip". This makes it impossible to replace with a stub in unit testing. The functions file controls $PATH, so we don't need absolute paths. This replaces the absolute paths... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5b4c712aab3edc0059f2e5a6730b7fdcf7e5f4ec)
| | * | | Eventscripts - Remove local variable usage in 10.interfaces.Martin Schwenke2011-08-081-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POSIX sh doesn't have local variables. Debian's dash doesn't behave the same way as bash on this contruct: local var=`command that produces multiple words` It only assigns the 1st word and may print an error. Just remove the use of the "local" keyword in monitor_interfaces() to solve this. It isn't actually limiting the scope of any variables that are used outside the function. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 95d9a1e19655461288a2c7e52abf9d01ab23e05a)
| | * | | Tests - implement "ctdb -Y ip -v" in stub for eventscript testing.Martin Schwenke2011-08-081-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is pretty limited but it gets 10.interfaces tests working. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 7130963430e530fa4dd5e6fe132bd7122349cc5f)
| | * | | Tests - stub ip program should assume interface name if "dev" not specified.Martin Schwenke2011-08-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it fails if you don't use the "dev" keyword. This makes it behave as expected. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4fa2073649f25993de4b8ef6b3e7172068a83a29)
| | * | | Eventscripts: source a file specified by $CTDB_RC_LOCAL in functions file.Martin Schwenke2011-08-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another unit testing hook. This is easier than dropping files into rc.local.d/ and then removing them. The file has to be executable. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b13ac3bdaf326a6cdfd87da9195eb9630806c418)
| | * | | Tests: update tests to work with previous commit.Martin Schwenke2011-08-085-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issues: * 10.monitor no longer prints a message when there is no public_addresses file. * Extra bonding test added to check workaround for IEEE 802.3ad Dynamic link aggregation bonding mode bug. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 01c941ab4c764c5aac0d7c0f90fca89775956d41)
| | * | | Tests: eventscripts and onnode tests use stubs/ subdirectory instead of bin/.Martin Schwenke2011-08-0819-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This sets up a more useful convention and avoids future .gitignore problems. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 58c696dc600f1073e693930da061776b6fb199f2)
| | * | | Tests: tweak some samba tests to cope with debug from ctdb_check_tcp_ports().Martin Schwenke2011-08-082-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a bit too static. However, it can fixed up later if it is a hassle. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 557ac30e60516742da10b83bfbbbb41430c977a2)
| | * | | Tests: Oops! Add bin directory for eventscript tests.Martin Schwenke2011-08-0818-0/+705
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was matched by .gitignore. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ef7e5da6241e326267800cd2bd53fb33a0386c2d)
| | * | | Git should ignore tests/eventscripts/var.xMartin Schwenke2011-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit bc94197025a1ec6efaed5586a725f698991b2b17)
| | * | | Tests: initial eventscript unit tests.Martin Schwenke2011-08-0860-0/+1650
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b675ca3c25b7155b9681128822d1280018ef68bb)
| * | | | Merge remote branch 'martins/eventscripts_relative'Ronnie Sahlberg2011-08-1011-145/+102
| |\ \ \ \ | | | |/ / | | |/| | | | | | | (This used to be ctdb commit cf61c5d1517d3979ce67e7b9bc836d040db8a416)
| | * | | Scripts: remove absolute paths from interface_modify.sh.Martin Schwenke2011-08-081-7/+7
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "ip" command is currently run as "/sbin/ip". This makes it impossible to replace with a stub in unit testing. The functions file controls $PATH, so we don't need absolute paths. This replaces the absolute paths... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2702592b5911cfa93625e36f4a0d1c4414c0e3e9)
| | * | Merge remote-tracking branch 'origin/master' into eventscripts_relativeMartin Schwenke2011-08-0838-272/+1653
| | |\ \ | | | | | | | | | | | | | | | (This used to be ctdb commit b723f23fc9c38e75b91d43306d606be26c55d31d)
| | * | | Eventscript functions - use $CTDB_VARDIR instead of local $ctdb_spool_dir.Martin Schwenke2011-08-081-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d0c6d9b19f0dd8946f9504b0d1cf50dd21f7a592)
| | * | | Eventscripts - remove some more absolute paths to commands.Martin Schwenke2011-08-044-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f5b7cb03aaf19fb4b12fc3f0c14d98ee2d7b0798)
| | * | | Eventscripts - Rework the use of get_proc() for the bonding checks.Martin Schwenke2011-08-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call call_proc(), put the output into a variable and then use it. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2dfdc997f432d522034922b43cb6f8f878d11ba7)
| | * | | Eventscripts: update 60.nfs service() start to use set_proc().Martin Schwenke2011-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 70ebb30b90956bb1212287d267ccb72ea83740ca)
| | * | | Eventscripts: update 10.interface to use set_proc() and get_proc().Martin Schwenke2011-08-031-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 61b7f0172ba5c83c847c29fac3582c25c7754b68)
| | * | | Eventscripts: use set_proc() in startstop_nfs().Martin Schwenke2011-08-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5a3d5c6b1ca3682bb45104e50061871dec6e9b1d)
| | * | | Eventscripts: remove unnecessary absolute paths from external commands.Martin Schwenke2011-08-038-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For eventscript unit testing it will be necessary to override external commands to allow stub implementations to be used. If absolute paths aren't used then this can be done using either a fake bin/ subdirectory or by using shell functions. This removes all of the simple cases of absolute paths. Signed-off-by: Martin Schwenke <martin@meltin.net> Conflicts: config/ctdb.init config/events.d/50.samba Keep old code but remove absolute paths. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 05851d50b0078de8bf4691442d718825adca6fe8)
| | * | | Eventscripts: new functions set_proc() and get_proc().Martin Schwenke2011-08-031-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These provide a thin layer around writing and reading files in /proc. They can be easily replaced by stubs for unit testing. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 637f9d8af517b73c72ed8f3cc2a2661f11eb2126)
| | * | | Eventscripts: remove ctdb_wait_command() and ctdb_wait_tcp_ports() functions.Martin Schwenke2011-08-031-59/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These haven't been used for a long time. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f5fd361cadb3ea18d29e2d7215a7853718e48d00)
| | * | | Eventscripts: iptables() should put lock in $CTDB_VARDIR.Martin Schwenke2011-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3f04793f391c63b78ffb9c9851ab3f0daf3ed50a)
| | * | | Make Emacs recognise that the eventscript functions file is a shell script.Martin Schwenke2011-08-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a6dfb76cfa759f6f9409f24368111c4f85ca0fbf)
| | * | | Eventscript functions: add $CTDB_ETCDIR and hook service() functions.Martin Schwenke2011-08-031-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * $CTDB_ETCDIR defaults to /etc but can be changed for testing. All hard-coded instances of /etc have been changed to $CTDB_ETCDIR. This includes references to /etc/init.d and /etc/sysconfig. * service() and nice_service() functions now call new function _service(). This makes it easier to override these functions (say, in rc.local) for testing and call most of the existing functionality using _service(). Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f43c9a7604b779bb6257ddb2bf3cbe266d496a63)
| | * | | Set $CTDB_VARDIR in the functions file.Martin Schwenke2011-08-033-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be needed when eventscripts that use it are called externally. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ebd53b66b0cc66d9d04830781886234167fc2164)
| * | | | Merge remote branch 'martins/test_suite'Ronnie Sahlberg2011-08-105-91/+43
| |\ \ \ \ | | |_|/ / | |/| | / | | | |/ | | |/| (This used to be ctdb commit 92eac08764e87bd3042d2a24ed36b2a339a04960)
| | * | Test suite: print debug output after cluster (un)healthy flip-flop on restart.Martin Schwenke2011-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 0e14213dfa841080c07fa6fce23b192493adb926)
| | * | Allow proxy_node to be specified for wait_until_node_has_status().Martin Schwenke2011-08-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default to "any"... but allow specification because sometimes it matters... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c12c97598afcd07ce4876b26e0b734bc825e54c1)
| | * | Test suite: Fix consistency in 26_ctdb_config_check_error_on_unreachable.Martin Schwenke2011-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test currently waits until any node thinks that the test node is disconnected, and then uses node 0 as a proxy for testing. However, nodes may notice at different times that a node is disconnected, so this test can fail unnecessarily. We force the proxy node for the wait-until-disconnected to be the same as the proxy node used to launch the actual tests. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 73cfc304513358e99e6505c95f44a4d319201309)
| | * | Test suite: Fix consistency in 09_ctdb_ping.sh.Martin Schwenke2011-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same problem as described in commit 283a85b42d9c0a26acb64d5abcc7f175e31e6e75. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 7758fd0591467a758e5d22404aa59fcbc1e1cb8b)