summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | tests: Move the "ctdb reloadips" test from complex/ to simple/Martin Schwenke2012-05-141-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is made possible by separation of public addresses files for local daemons and the addition of get_ctdbd_command_line_option(). Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2bcd58b30d7cf6dd48ad7f019810c6965a44c85a)
| * | tests: Fix a typo in daemons_setup()Martin Schwenke2012-05-141-2/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 863ad337fa3c4effe1fd370d3ba414027c600bd6)
| * | tests: New function get_ctdbd_command_line_option() for integration testingMartin Schwenke2012-05-141-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows, for example, the public addresses file used by a particular daemon to be known. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f4b7d14f2e3c7345e7a09abb27c32923fb78cbc4)
| * | tests: Use per-daemon public_addresses file for local daemonsMartin Schwenke2012-05-141-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | This allows a node's public addresses file to be hacked for testing. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c7d6e4557d00de674737e2c8d6cbebaa2461c303)
| * | tests: Restore the old behaviour of "make test" so it uses tests/varMartin Schwenke2012-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is finally possible, given all the other changes... :-) This is a good default because daemons will be left running, test/var will still exist and test failures can be investigated. To "automatically" clean up, do: ./tests/run_tests.sh -C -V tests/var -- tests/simple/99_daemons_shutdown.sh ... although "killall ctdbd ; rm -rf tests/var" is less keystrokes. ;-) Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d661f09c6c76543bd091d51bc0e6fe97ed0f55d1)
| * | tests: Fix wrapper scripts to handle options and tests without breakageMartin Schwenke2012-05-144-66/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the -V option is given and no tests are supplied, the "cd" command in run_tests.sh cause scripts/run_tests to interpret the argument to -V incorrectly. Therefore, the wrapper scripts can't use "cd" because they don't know what the options are doing! Instead scripts/run_tests searches for each test relative to the current directory and, if not previously found, then searches relative to the top-level tests directory. This is a much better way of doing things. Given that run_tests.sh and run_cluster_tests.sh were starting to contain duplicate complex logic, remove run_cluster_tests.sh and replace it with a symlink to run_tests.sh. Run_tests.sh checks $0 to see what options/defaults to use. Update INSTALL to deal with this. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ed2db1f4e8d2b222d7f912a4a007ce48a23e83b0)
| * | tests: Add a test for "ctdb reloadips"Martin Schwenke2012-05-111-0/+108
| | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d2514051761ba23deee0e118c25afab2ab8d854e)
| * | tests: In integration tests, use --node-ip to avoid locking weirdnessMartin Schwenke2012-05-111-1/+2
| | | | | | | | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a00e80c701a0f9695f41c24e0360c25c0873d49d)
| * | tests: Allow run_cluster_tests.sh to take optionsMartin Schwenke2012-05-111-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | However, options must be followed by "--". This also fixes: * a bug where specifying tests caused local daemons to be used; and * an incorrect comment. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6b8507d4d3062e709409b3790117d87311b3460d)
| * | tests: Allow run_tests.sh to take optionsMartin Schwenke2012-05-111-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | However, options must be followed by "--". Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit db8cf8f5e644a0b21a6040287887fee40f38d4db)
| * | tests/eventscripts: Fix a policy routing testMartin Schwenke2012-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The previous commit 55006ea8999ab3721fcde81b92692661065f0688 highlighted an error in this test. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9f20fbf91706db94f65f62dbd6a4e087890c1da9)
| * | tests/eventscripts: $CTDB_BASE needs to be in $TEST_VAR_DIRMartin Schwenke2012-05-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The policy routing tests write the configuration file into $CTDB_BASE, as per rcommended practice. Unless this is in $TEST_VAR_DIR this won't work sensible when the tests are installed. Things are done slightly different than for /etc. Here we use symlinks and we want them to be dereferenced. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 61c80f58a8cfbaca7e669ef8cd95b4f6b5dc66c7)
| * | Packaging: Improve dependenciesMartin Schwenke2012-05-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't strictly need gawk (i.e. could probably use nawk), but that seems to provide /bin/awk on RHEL. PreReq seems old-school. We don't have an scriptlets, so nothing needs to be installed before CTDB. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e7ba0a30e7b7fe78e83e493128b349708cf0038a)
| * | Packaging: add options to ctdb.spec.in to force use of bundled librariesMartin Schwenke2012-05-111-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | Ideas borrowed from the Fedora samba4 spec file. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 14a630cbc638d2f3bf699de5d94131e5f7d1a3ea)
| * | Eventscript functions: add optional version to nfs_check_rpc_service()Martin Schwenke2012-05-111-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This can be optional because the 1st item of each action-triple is a test comparison that starts with '-'. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1957d53b78f101cd0cd37d9705a225deef5174a2)
| * | Packaging: devel package fixesMartin Schwenke2012-05-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Group was non-existent, typo in summary. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f0a14169883661a702a352aa0311a2b433071a83)
| * | Packaging: generate a ctdb-tests packageMartin Schwenke2012-05-111-1/+20
| |/ | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5c23244591b8005f91d8e25e719cd332c711db14)
| * We dont need to serialize the "probe which address this node is" if we have ↵Ronnie Sahlberg2012-05-101-20/+27
| | | | | | | | | | | | given an explicit --node-ip on the commandline (This used to be ctdb commit e3dc5bd3f1ef1f0ed08f57a5b5bafcac936e9ed0)
| * Track all child process so we never send a signal to an unrelated process ↵Ronnie Sahlberg2012-05-0317-79/+165
| | | | | | | | | | | | | | | | | | | | | | (our child died and kernel wrapped the pid-space and reused the pid for a different process Wrap all creation of child processes inside ctdb_fork() which is used to track all processes we have spawned. Capture SIGCHLD to track also which child processes have terminated. Wrap kill() inside ctdb_kill() and make sure that we never send a !0 signal to a child process pid that has already terminated (and might have been replaced with a (This used to be ctdb commit f73a4b1495830bcdd094a93732a89dd53b3c2f78)
| * DOC: document the reloadips commandRonnie Sahlberg2012-05-033-79/+170
| | | | | | | | (This used to be ctdb commit 90e8c4dc7d89c460ad2da5a9af1cef006db3b1c0)
| * RELOADIPS: simplify the reloadips code a bitRonnie Sahlberg2012-05-013-42/+33
| | | | | | | | | | | | | | | | and also update the "read public address file" to not check if the address exists already locally when we read if from the child process, to stop it from spamming the logs with "We already host ..." messages (This used to be ctdb commit 334ea830f1bf33419f4a1e78f23afd41a852d0f4)
| * Revert "server: locking: Provide a common API for non-blocking locking of TDBs"Amitay Isaacs2012-05-011-783/+0
| | | | | | | | | | | | | | | | This reverts commit 6a92fc2b8da2bba98dca29b781ab459ba4e879a5. Reverting incomplete changes to ctdb_lock.c (This used to be ctdb commit 2a3d22431948f849c93762a6ab49344acb687feb)
| * server: locking: Provide a common API for non-blocking locking of TDBsAmitay Isaacs2012-05-011-0/+783
| | | | | | | | (This used to be ctdb commit 6a92fc2b8da2bba98dca29b781ab459ba4e879a5)
| * tests/simple: Fix typo in the test messageAmitay Isaacs2012-05-011-1/+1
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit c642b452e7b0272e32c02509ac579b790d9a03e7)
| * Add new control to reload the public ip address file on a nodeRonnie Sahlberg2012-05-017-10/+450
| | | | | | | | | | | | | | Also add a method to use the recovery master/daemon to reload the public ips on all nodes in the cluster. Reloading the public ips on all node sin the cluster is only suported if all nodes in the cluster are available and healthy. (This used to be ctdb commit 05603e914f8c12618d7e06943c0f7df207f645b0)
| * tests: Update READMEMartin Schwenke2012-04-271-1/+18
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e9fad1ff82e6fb9e6bf615986c41c746fd415058)
| * tests/eventscripts: $CTDB_ETCDIR should be in $TEST_VAR_DIRMartin Schwenke2012-04-271-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | The policy routing tests modify /etc/iproute2/rt_tables, so this directory should not be in the installation area. Instead the contents of tests/eventscripts/etc are copied into a place under $TEST_VAR_DIR where the directory can be modified with gay abandon. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a0afb4195caab39891a304b8b4eadd94cab7c4a7)
| * tests/eventscripts: Use a canned ctdb.sysconfig rather than a linkMartin Schwenke2012-04-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | The link is hard to manage and has no real advantage. The canned config is 2 of the 3 currently non-comment/whitespace lines in config/ctdb.sysconfig. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 66d0b913301c3b1037278bcaa0452ecbe07248df)
| * tests/eventscripts: Explicitly set CTDB_SERVICE_AUTOSTARTSTOP="yes"Martin Schwenke2012-04-272-0/+2
| | | | | | | | | | | | | | | | | | No use depending on defaults in the initscript - the tests should control what is tested. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1c37abac5fd18c139aa55989d0fb6b475f4c22f1)
| * tests/eventscripts: Be more defensive about removing the var directoryMartin Schwenke2012-04-271-1/+2
| | | | | | | | | | | | | | | | | | Could add -r but that might avoid error. The only time it doesn't exist is the 1st time a top-level var directory is used. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 047d97dc84a5943556efb31bb2856fd04835fffa)
| * Eventscripts: fix basename -> dirname typoMartin Schwenke2012-04-271-1/+1
| | | | | | | | | | | | | | | | I fixed one of these previously but didn't notice this one... :-( Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 0c674efd19368d41d9cc28909d2b16c1af54c86c)
| * tests/eventscripts: Add sanity check to esnure events.d/ can be foundMartin Schwenke2012-04-271-0/+25
| | | | | | | | | | | | | | | | | | If it can't, the installation is probably inconsistent, so a (hopefully) helpful message is printed. :-) Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit df732ca8e27f0f3417b4d5d259157bd0e0632124)
| * tests: Add installation script for testsMartin Schwenke2012-04-272-0/+95
| | | | | | | | | | | | | | | | This could all be done in Makefile.in, but that would be very complex. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 12c9986059cacda819e669fa77d613b408c62599)
| * tests/simple: Add new pseudo testcase to potentially shutdown local daemonsMartin Schwenke2012-04-271-0/+23
| | | | | | | | | | | | | | | | Only shuts them down if $TEST_CLEANUP is true. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit eddfc02335202d853e29a89f08225ab44cac8a25)
| * tests: New run_tests -C (cleanup) optionMartin Schwenke2012-04-271-1/+12
| | | | | | | | | | | | | | | | | | Sets TEST_CLEANUP=true and causes $TEST_VAR_DIR to be removed... and potentially other cleanup actions in testcases. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3219f221a858e499f084b8beb44610537312602b)
| * tests/eventscripts: $FAKE_IP_STATE is always set in ip command stubMartin Schwenke2012-04-271-2/+0
| | | | | | | | | | | | | | | | No need for a default, especially since there is no sane default! Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b430a5f61cfdc28e967890602ce6dac0e922c07d)
| * tests: Time logging in integration tests should use TEST_VAR_DIRMartin Schwenke2012-04-272-2/+2
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 734cbd7def23236d418ebc6d813a748a84900101)
| * tests: Unit tests should use $TEST_VAR_DIRMartin Schwenke2012-04-272-8/+3
| | | | | | | | | | | | | | | | | | This directory is already guaranteed to be absolute, so no check is needed. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 78f6f209eb15102f4e8baa9106583df0ef4bb693)
| * tests: Improve the logic for adding directories to $PATHMartin Schwenke2012-04-272-6/+29
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e6bfd3bdb3a35b2e7e7c41a6f37976772a54e3ce)
| * tests: Update integration.sh to use TEST_VAR_DIRMartin Schwenke2012-04-271-27/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are 2 subtleties: * Local daemons currently use the in-tree tests/events.d/ subdirectory for their eventscripts. However, some tests install/remove test-specific eventscripts so now $TEST_VAR_DIR/events.d/ is used and the standard eventscripts are copied there at setup time. * The pgrep/pkill logic for killing local daemons currently relies on ctdbd being run with a full path to tests/bin/ctdbd. If the tests are installed and run against an installed daemon then this won't work. Therefore, ctdbd is now expected to be in $PATH and is found/killed by matching: ctdbd --socket=.* --nlist .* --nopublicipcheck This is complex but should avoid killing a real ctdbd running on a node. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 301491802eec0e49e108f5aae7d7be379703d72c)
| * tests: Add a -V option to set new variable TEST_VAR_DIRMartin Schwenke2012-04-271-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of preparation to be able to install the tests. The current var/ subdirectories will end up somewhere in /usr/local/ or /usr/ and we don't want to put temporary files there. This creates a temporary TEST_VAR_DIR by default. If -V is specified then the given directory will be used as TEST_VAR_DIR. This allows the current behaviour where individual integration tests can be run against already-running daemons 9with sockets and other stuff already created) to save time and trouble. Yes, there are plans for a clean-up option... ;-) Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 8e4ec9a40bb7d392d7474b067a74fa121c069007)
| * tests/integration: Remove cabability for testcase optionMartin Schwenke2012-04-271-48/+0
| | | | | | | | | | | | | | | | | | | | This is unused and can't be used with the current test infrastructure. It may have been useful with ctdb_test_env but I don't think it was ever used. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4aa879466dd46cb4e8710edbbaac1276521e475b)
| * tests/integration: Use absolute path for socket symlinkMartin Schwenke2012-04-271-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 709cd5dfeb630096a1cd2062da666fee9ddca715)
| * tests/simple: Replace "tdbdump" with "ctdb cattdb"Martin Schwenke2012-04-271-15/+15
| | | | | | | | | | | | | | | | tdbdump may not be installed and would be an unnecessary dependency. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit fbabc05569d91bf033f474d89f51b49490943332)
| * tests: Make run_tests -X more flexible - it now works with onnodeMartin Schwenke2012-04-274-12/+19
| | | | | | | | | | | | | | | | | | Hardcoding "sh -x" is suboptimal because some scripts, like onnode, require bash. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 246809af64c03d26288abff5907ed46614e72b15)
| * tests: Update README files and add new README files where missingMartin Schwenke2012-04-277-100/+113
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit bef03b32f8ec114a64c55b25951aeeb939d87b33)
| * tests: Update top-level wrapper scriptsMartin Schwenke2012-04-272-4/+24
| | | | | | | | | | | | | | | | | | * Add the unit tests to "make test" * Make scripts run from anywhere Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 95947123eee687ed83eebc567397a5bc9d55a945)
| * tests: run_tests should exit with failed test status if running with -HMartin Schwenke2012-04-271-1/+5
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6eb7fa572e7fc212332ddd68793e3f35161baf7c)
| * tests: test_wrap can use $TEST_SCRIPTS_DIR for a little extra clarityMartin Schwenke2012-04-271-1/+4
| | | | | | | | | | | | | | | | Also add a comment to explain what is being added to $PATH. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 704a3e3b83aff63e8f7b0650c141776ed2c1f047)
| * tests: test_wrap needs to set TEST_SCRIPTS_DIRAmitay Isaacs2012-04-271-0/+2
| | | | | | | | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 79e979d67e3a2a5a13ef8fd2ef8f56331ec51558)