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

189 Commits

Author SHA1 Message Date
Martin Schwenke
c9ca8ccc23 When running with local daemons, provided there is more than 2 of
them, randomly pick a single node that will not have any public IPs
assigned.  This will make life a bit more interesting and will
simulate what happens on real clusters with a management node.  Some
tests were disabling a node to implicitly trigger a ctdb restart - now
use an explicit restart of ctdb when it is required.
17_ctdb_config_delete_ip.sh now randomly chooses a public IP on any
node to disable - this works around a problem where the hardcoded node
might not have any public addresses.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 3d59783c0e9478f4766c380945d6200fc654f5d9)
2008-12-08 08:15:18 +11:00
Martin Schwenke
805c5bf1f3 New test for getmonmode. Overload node_has_status some more to
support checking the monitoring mode.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 4e1c079deb0aafb99d4114bb6504ff5ba1cbdeb4)
2008-12-04 17:19:51 +11:00
Martin Schwenke
9a4f7e4f4c ctdb_test_init now contains a trap to force ctdb_test_exit to be run
if the shell exits and ctdb_test_exit cancels this trap.  This means
that a testcase executing under set -e will call ctdb_test_exit on
failure, allowing the cluster to be restarted if necessary so that
following tests can complete successfully.  ctdb_test_exit now
respects $?, so a test will fail if the last thing executed before
ctdb_test_exit failed - this probably means the above trap was
triggered.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 805a426aaee5ecfc5bd1c097069fe58f8241dfe2)
2008-12-03 18:08:21 +11:00
Martin Schwenke
3cdc0cb708 $PATH only inludes $CTDB_DIR/bin if we're using local sockets. Rename
$TEST_WRAP to $CTDB_TEST_WRAPPER - value now set using
$CTDB_TEST_REMOTE_SCRIPTS_DIR if that is set.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit a69545d7dec78eefb85a1598e5db4667cc210bf9)
2008-12-03 15:48:24 +11:00
Martin Schwenke
a04094659c 4 new tests. Hacked function node_has_status to support
frozen/unfrozen via ctdb statistics command.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit e040a989096cf7d5c0cdece1713ff903cb7568f8)
2008-11-27 18:11:22 +11:00
Martin Schwenke
0b6da4f7ec 4 new tests. Marked more ctdbd.sh tests as done - will remove this
file soon.  Simplify 06_ctdb_getpid.sh by using -v option to
try_command_on_node.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit c6fc68db9061547e73ec2b811e260bd7da7f58fa)
2008-11-25 17:53:28 +11:00
Martin Schwenke
5d50f5a91c New test 09_ctdb_ping.sh. Add documentation and command-line
processing to all tests.  New script ctdb_test_env sets up environment
for tests, is now sourced by run_tests, and can also take a test on
the command-line, complete with options.  Various cleanups and
improvements.  Document tests that have been properly implemented in
ctdbd.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 826e85fe5291067b8d0b9c22918d63024aa6141c)
2008-11-24 17:47:09 +11:00
Martin Schwenke
734f3ada52 Move tests/*.c to tests/src/*.c and adjust Makefile.in accordingly.
Move setting of $CTDB_NODES_SOCKETS to tests/scripts/run_tests and
make it only happen if $CTDB_TEST_REAL_CLUSTER is not set.  Bugfix in
function ips_are_on_nodeglob.  New/proper implementations of functions
stop_daemons and start_daemons, now called by function restart_ctdb.
In start_daemons.sh, add public addresses file generation/usage, use
new option --nopublicipcheck to ctdbd to avoid crazy behaviour and
kill ctdbd more carefully to avoid killing real daemons on a real
cluster - this should be able to coexist on a node of a real cluster.
start_daemons.sh is temporarily incompatible with start_daemons
function, but expecting to replace that script with function calls
very soon anyway...

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 4c54772c5c2fa7d2a25963379b5b96caf0c2521c)
2008-11-21 19:01:48 +11:00
Martin Schwenke
d741559fa6 Add some simple tests that can be run from within the tree.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit eacb2ef82ea4809d874158756db973dd1e3fc8fc)
2008-11-20 20:40:01 +11:00
Ronnie Sahlberg
07d35c754f add a CTDB_SOCKET variable that can be used to override the default
/tmp/ctdb.socket

(This used to be ctdb commit b75e2263c565c21ecbbd98fbd2c10787e467bf5c)
2008-11-11 14:49:30 +11:00
Ronnie Sahlberg
d83fc7e389 when we collect all ip addresses and sort them for the "ctdb ip -n all" output we must look at more than just the first 4 bytes of the sockaddr address or ipv6 wont work
(This used to be ctdb commit 4dfbfb4618433d9ed79ca1bdb1e2e51d96d4ee62)
2008-08-22 09:09:08 +10:00
Ronnie Sahlberg
37234887d9 fix the ipv6 checksum calculation for pseudoheader so that it actually works
add support to send ipv6 "gratious arp" aka neighbor solicitation packets from ctdb

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>

(This used to be ctdb commit 0a38ea11af9237501f2951fee698a59b46f8750d)
2008-08-19 18:24:08 +10:00
Ronnie Sahlberg
342408d75e remove a file we dont need
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>

(This used to be ctdb commit bf6effef0cc9e5f2eeeb38fce855a90624a76239)
2008-08-19 14:58:57 +10:00
Ronnie Sahlberg
ef997d344f initial ipv6 patch
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>

(This used to be ctdb commit 1f131f21386f428bbbbb29098d56c2f64596583b)
2008-08-19 14:58:29 +10:00
Andrew Tridgell
ae2b9ee17f fixed some warnings
(This used to be ctdb commit fe55bfc8fb6dc628f72f220843e829a251d09936)
2008-07-30 19:59:54 +10:00
Andrew Tridgell
446295f257 fixed a warning
(This used to be ctdb commit 3a71844cfdb9fe69208030432ddb547b0e215726)
2008-07-30 19:59:42 +10:00
Andrew Tridgell
5e969d7a6c cleanup of the old persistent db test
(This used to be ctdb commit 306af4ccef132ea023f1f01e11f877a3a742ee4c)
2008-07-30 19:59:34 +10:00
Andrew Tridgell
bc1aed395c added a new persistent transaction test program
(This used to be ctdb commit d5dcb46e182466e4b51c106f2491178c23babd8d)
2008-07-30 19:55:54 +10:00
Andrew Tridgell
bf32a8e6c3 cleanup on SIGINT
(This used to be ctdb commit 008533d971aec9c28c6e4750ef4677dd943633ff)
2008-07-30 13:21:02 +10:00
Andrew Tridgell
b7e9d0dccf - cleanup persistent db at start
- catch SIGINT and kill daemons

(This used to be ctdb commit d3f5d75665a78ae0081fda57e58384b27a6ae396)
2008-07-30 13:20:47 +10:00
Andrew Tridgell
9c10147fc1 - show pids during test
- don't use first_time, as it is not safe for multiple 
  clients on a node

(This used to be ctdb commit 22f737be0e70fc043affaa4f953f60d852b7999a)
2008-07-30 13:20:24 +10:00
Ronnie Sahlberg
1c88f422d5 add a parameter for the tdb-flags to the client function
ctdb_attach()   so that we can pass TDB_NOSYNC when we attach to
a persistent database and want fast unsafe writes instead of
slow but safe tdb_transaction writes.

enhance the ctdb_persistent test suite to test both safe and unsafe writes

(This used to be ctdb commit 4948574f5a290434f3edd0c052cf13f3645deec4)
2008-06-04 10:46:20 +10:00
Ronnie Sahlberg
a594ac1e91 run the persistent write test with 4 nodes by default
use the timelimit argument to the persistent writer to run the test for
30 seconds by default

(This used to be ctdb commit 181318fea6886c40d0aff02d0de777f28ffeddce)
2008-06-03 18:19:48 +10:00
Ronnie Sahlberg
fba38a5325 redesign the test of persistent writes
so that we have n persistent writers on n nodes,
all writers writing persistently to the same record.

each writer on a node has its own "counter" in this record that is incremented by one in each iteration.
the persistent writer on node 0 also checks that all the counters in the record are increasing monotonically and if they are not, flagging it as an ERROR.

(This used to be ctdb commit 00006222ece63ae3b7f3477646232ae5bbeee6f4)
2008-06-03 18:18:28 +10:00
Ronnie Sahlberg
a8cf6e7914 create the nodes file in a 'test' subdirectory and not the current directory
delete all persistent databases when the test starts
(the tests only uses test databases in a special test directory)

do not set up any public addresses in the tests

wait until there are no disconnected or unhealthy nodes when starting the
test daemons instead of waiting for the recovery mode to change.
we do want to wait until the system has recovered and ALL nodes are ok.

(This used to be ctdb commit dfe0c44c1e8e9dab790686c5ba798986d04bf218)
2008-06-03 18:14:54 +10:00
Andrew Tridgell
f6e53f433b merge from ronnie
(This used to be ctdb commit e7b57d38cf7255be823a223cf15b7526285b4f1c)
2008-02-04 20:07:15 +11:00
Andrew Tridgell
146d4b0db7 merge async recovery changes from Ronnie
(This used to be ctdb commit 576e317640d25f8059114f15c6f1ebcee5e5b6e2)
2008-01-29 13:59:28 +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
b62b7fcde8 added syslog support, and use a pipe to catch logging from child processes to the ctdbd logging functions
(This used to be ctdb commit 1306b04cd01e996fd1aa1159a9521f2ff7b06165)
2008-01-16 22:03:01 +11:00
Andrew Tridgell
fae327d471 report the store rate in ctdb_randrec
(This used to be ctdb commit da3fb053d91da76122b12f0efb1d31e085b59574)
2008-01-09 17:45:13 +11:00
Andrew Tridgell
5b6486c35b allow delete percentage to be specified on the command line
(This used to be ctdb commit 1177b48067a92cbf013e19027d4122327c620361)
2008-01-09 15:32:18 +11:00
Andrew Tridgell
10bc8a4c92 added ctdb_randrec test tool
(This used to be ctdb commit be59e7f3db992667664a631433b99ff19f4313f0)
2008-01-04 09:41:04 +11:00
Andrew Tridgell
bb06e831a0 more optimisations to recovery
(This used to be ctdb commit 9a41ad0a842cd4f3792d6e84b5c809b7ff6f342e)
2008-01-02 22:44:46 +11:00
Andrew Tridgell
fa965dee8f quick fix for timeout in recovery
(This used to be ctdb commit 9205c681a819782d061bb41637191c130e91b100)
2008-01-02 12:04:07 +11:00
Andrew Tridgell
4608fcc3a4 need public_addresses for test suite
(This used to be ctdb commit 6d79994eace4802ab72dda2793028264c47d2d56)
2007-11-18 15:01:26 +11:00
Andrew Tridgell
0943fba979 make it easier to test starting large numbers of virtual nodes
(This used to be ctdb commit cf61bf8b8806d29772985c904d5ee15c24d4d767)
2007-11-13 10:28:06 +11: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
c60988325d added support for persistent databases in ctdbd
(This used to be ctdb commit 3115090a0d882beca9d70761130b74bb0821f201)
2007-09-21 12:24:02 +10:00
Ronnie Sahlberg
583b6e6ba6 change ctdb_get_vnn to ctdb_get_pnn
(This used to be ctdb commit 1e19930198c2bcc7ccb755e0ee51555fb823029a)
2007-09-04 10:18:44 +10:00
Ronnie Sahlberg
8fd3df2553 hang the ctdb_req_control structure off the ctdb_client_control_state
struct  so that if we timeout a control we can print debug info such as 
what opcode failed and to which node

we dont need the *status parameter to ctdb_client_control_state

create async versions of the getrecmaster control

pass a memory context to getrecmaster

(This used to be ctdb commit 558b680c82f830fba82c283c78c2de8a0b150b75)
2007-08-23 13:00:10 +10:00
Andrew Tridgell
95f6328678 merge from volker
(This used to be ctdb commit 7007e4f2292aa96287b899d6b9e82c7b597ef58f)
2007-08-22 17:16:01 +10:00
Andrew Tridgell
46639ac19e merged new event script calling code from ronnnie
(This used to be ctdb commit bbacad61b3eee4276ffe44ed2a23949aca8152cf)
2007-08-20 11:10:30 +10:00
Andrew Tridgell
f2fb717402 merge from ronnie
(This used to be ctdb commit 0a91fe52f34d997c1a3cde0fa356deaaf290a4a9)
2007-08-15 11:48:03 +10:00
Ronnie Sahlberg
e0957ba4a4 add a function to return the first entry that is stored in a tree where
the key is an array of uint32_t

(This used to be ctdb commit 99553397aade4f1c4d17ef14dad406934958c80a)
2007-08-15 10:57:21 +10:00
Ronnie Sahlberg
9c6e37fea4 enhanced tests to verify the tree integrity when adding/removing nodes
(This used to be ctdb commit 7885a4fa6e4ac50081e440ed6c82101ec807999f)
2007-08-13 14:29:19 +10:00
Ronnie Sahlberg
a405cc32d9 remove an extra blankline
(This used to be ctdb commit c71f237e384b33e3c560af3329c615bda613ca04)
2007-08-09 16:11:11 +10:00
Ronnie Sahlberg
adb49f02f0 change the mem hierarchy for trees. let the node be owned by the data
we store in the tree and use a node destructor so that when the data is 
talloc_free()d we also remove the node from the tree.

(This used to be ctdb commit b8dabd1811ebd85ee031563e95085f720a2fa04d)
2007-08-09 14:08:59 +10:00
Ronnie Sahlberg
5332b61c4f run the test for 60 seconds if that is what we claim
(This used to be ctdb commit ff0c0526e21c35fe7a599e61cd0f84352c7f6ad6)
2007-08-08 17:49:08 +10:00
Ronnie Sahlberg
22e8064ae9 add more extensive test cases and verify that we are not losing any
memory inside the tree

(This used to be ctdb commit 838376b52d65af509532a141d83b51975c7cc881)
2007-08-08 17:26:40 +10:00
Ronnie Sahlberg
203306400e add helpers to traverse a tree where the key is an array of uint32
(This used to be ctdb commit d328c66827cafff6356e96df2a782930274fe139)
2007-08-08 13:50:18 +10:00