1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

120 Commits

Author SHA1 Message Date
Michael Adam
30dead171f ctdb:tests:76_ctdb_pdb_recovery: fix a typo in a message
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2013-11-28 07:31:13 +01:00
Michael Adam
3e083f96ff ctdb:tests:76_ctdb_pdb_recovery: fix a typo in a message
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2013-11-28 07:31:12 +01:00
Martin Schwenke
bfbf62b6c9 ctdb:tests/simple: Nobody looks at /tmp/recloop.out so use /dev/null instead
Otherwise this should use mktemp, something should look at the output
and the file should be removed.  :-)

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Nov 27 20:39:00 CET 2013 on sn-devel-104
2013-11-27 20:39:00 +01:00
Martin Schwenke
a8f2791a9d ctdb-tests/integration: Neaten up some of the persistent database tests
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-27 18:46:16 +01:00
Martin Schwenke
c6551132f5 ctdb-tests/simple: User sleep_for() instead of sleep
Progress...

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-27 18:46:16 +01:00
Martin Schwenke
2b6db9041d ctdb-tests/simple: Update persistent DB tests
* Low level DB checks should ignore the sequence number record.

* A restart is needed after messing with the RecoverPDBBySeqNum
  tunable.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-27 18:46:16 +01:00
Martin Schwenke
e850cddcc4 ctdb-tools/ctdb: New ptrans command
Also add test.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-27 18:46:16 +01:00
Amitay Isaacs
296bd44c04 ctdb-tests: CTDB tool should always be invoked as $CTDB instad of ctdb
$CTDB_TEST_WRAPPER is required only to run test functions or test binaries
on remote nodes.  For running ctdb command, $CTDB is sufficient.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-27 18:46:15 +01:00
Amitay Isaacs
c91394c950 ctdb-tests: No need to run onnode in parallel for single node
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-27 18:46:15 +01:00
Amitay Isaacs
780391c0ba ctdb-tests: Remove -q option to try_command_on_node
This option is always passed to onnode by default.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-27 18:46:15 +01:00
Amitay Isaacs
25f3c8b526 tests: Fix calling of ctdb tool from test
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 9381c33dfd40192b7532d942059c2959dfae059d)
2013-11-07 16:08:44 +11:00
Amitay Isaacs
524696fa26 tests: No need to set sequence number when modifying persistent database
With the new persistent transaction code, sequence numbers will be
automatically updated whenever a record is updated.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 961dd5d0acbb971756944ea9f69992020ea7d9fc)
2013-10-04 15:47:11 +10:00
Amitay Isaacs
e4ed152d59 tests: Add a simple test to test cluster wide database traverse
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 713c9ecc791e3319a2d109838471833de5a158c8)
2013-09-26 10:21:31 +10:00
Martin Schwenke
44b7397962 tests/simple: Fix the reloadips test to cope with changes to reloadips
Specifying nodes to reload no longer uses -n.

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

(This used to be ctdb commit d921b2756d5f1c4ad7a35fe120f6fda9f5bf5686)
2013-09-19 12:54:32 +10:00
Martin Schwenke
1c3f4f55b0 tests/simple: Minimise the chance of a monitor event being cancelled
A monitor event following a "ctdb delip" might reconfigure services.
If the monitor event is cancelled then a service might be stopped but
not yet restarted and this could result in the subsequent monitor
events failing.

This obviously needs to be fixed in CTDB itself.  This will happen by
making "ctdb reloadips" the supported way of reconfiguring IPs.

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

(This used to be ctdb commit 618ea3660e36e7bd92b686e1ca8728cf63c3c068)
2013-08-22 17:00:20 +10:00
Martin Schwenke
d63cf0e7a7 tests/simple: Unreachable node test should wait for recovery to complete
This should minimise the chances of a control timing out.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 63be516673c5d9c0d543617bf1bb8bca919956a8)
2013-08-14 15:57:03 +10:00
Martin Schwenke
0997b0c400 tests/simple: Fix the missing IP test
Update the missing IP test to wait until restarts are complete.
Otherwise a service restart can collide with the following monitor
event and cause chaos.

Also, do not disable 10.interface until it matters.  Disabling it too
early can cause even more chaos if something goes wrong with the
monitor step.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 4e3bd06916bd3adac213fb18c7c2a24854b02d45)
2013-08-14 15:57:03 +10:00
Martin Schwenke
417ee2f0aa tests/simple: Add -p in onnode test to help show groups of connections
Change the command from "true" to "hostname" since the former won't
produce any output when used in combination with "onnode -p".  This
could just be changed to "echo" but the hostname might actually be
useful.

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

(This used to be ctdb commit ae3c03d80264e997b7da9f3279d7810e18b8a1df)
2013-07-22 19:36:58 +10:00
Michael Adam
f07d47a56d tests: add a comment to recovery db corruption test
The comment explains that we use "ctdb stop" and "ctdb continue"
but we should use "ctdb setcrecmasterrole off".

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit 06ac62f890299021220214327f1b611c3cf00145)
2013-04-17 21:16:45 +10:00
Amitay Isaacs
41e2a2e272 tests: Add a test for subsequent recoveries corrupting databases
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit b1577a11d548479ff1a05702d106af9465921ad4)
2013-04-17 21:16:45 +10:00
Amitay Isaacs
43860e4ba0 tests: Fix typo in variable name
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 043e18a8324ccb2c8ddd7b323ebedb5b0de1298d)
2013-04-15 15:37:39 +10:00
Amitay Isaacs
cad815164c tests: Add a test for recovery of persistent databases
Ensure that RSN based recovery and __db_sequence_number__ based recovery
methods for persistent databases work correctly.  They should not cause
corruption of the database.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 45d439a1ab093b420c27b1502ef109021833c7af)
2013-01-09 13:18:34 +11:00
Martin Schwenke
ef7329a415 tests/simple: Add test to check recovery daemon IP verification
Also update ips_are_on_nodeglob() to handle negation.

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

(This used to be ctdb commit 13a5944f8a27d43006acfffba76958693cae7702)
2013-01-08 13:27:10 +11:00
Martin Schwenke
752ab15cb1 tests: new simple integration test for delip interface garbage collection
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 1a5410e8349cdb96fdc51aa5ecd4f5734f6798a5)
2013-01-07 12:19:34 +11:00
Amitay Isaacs
4ca7f95d4f tests: Do not check release suffix in ctdb version test
release suffix added by RPM is to track packaging changes. Core CTDB
version does not include the release suffix.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit aad1584da8a8425bc6f5163c95810e9d2390dc91)
2012-10-31 12:19:03 +11:00
Amitay Isaacs
6182d9eaa1 tests: Fix statistics test for new output lines from locking API
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 1ee55c511b99e9f8a6fa4e34207267e953f09bae)
2012-10-20 02:48:44 +11:00
Martin Schwenke
e2a604f93c tests/simple: ctdb stop/continue tests weren't actually checking IPs
The correct variable is $test_node_ips, not $ips.

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

(This used to be ctdb commit 8d17dacee415dd0b4268805a366a86f83e33f27c)
2012-07-26 22:03:00 +10:00
Martin Schwenke
959e37da7b tests: simple tests against local daemons should check $TEST_LOCAL_DEAMONS
Note the old $CTDB_TEST_REAL_CLUSTER - it doesn't exist anymore...

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

(This used to be ctdb commit 47180dc75d15f3d61470705603565b718491c9f8)
2012-07-26 22:03:00 +10:00
Martin Schwenke
867381486d tests/simple: ctdb reloadips test should use $test_ip
There's no point recalculating this value.

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

(This used to be ctdb commit 6e7bd9685406ae024d413a5d9d8c6e0d89b15567)
2012-07-26 22:03:00 +10:00
Amitay Isaacs
0cb1cc631d tests: Fix ctdb_fetch test (parse extra lines of output)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 0be452958db95c8253c362a1c08a1966e53a1f99)
2012-05-28 11:22:28 +10:00
Martin Schwenke
aa50bc580c tests: Move the "ctdb reloadips" test from complex/ to simple/
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)
2012-05-14 15:13:41 +10:00
Amitay Isaacs
ec72e30b8f tests/simple: Fix typo in the test message
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit c642b452e7b0272e32c02509ac579b790d9a03e7)
2012-05-01 12:09:38 +10:00
Martin Schwenke
46f82181d0 tests/simple: Add new pseudo testcase to potentially shutdown local daemons
Only shuts them down if $TEST_CLEANUP is true.

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

(This used to be ctdb commit eddfc02335202d853e29a89f08225ab44cac8a25)
2012-04-27 15:42:42 +10:00
Martin Schwenke
451e660338 tests: Time logging in integration tests should use TEST_VAR_DIR
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 734cbd7def23236d418ebc6d813a748a84900101)
2012-04-27 15:42:42 +10:00
Martin Schwenke
edaead3cd5 tests/simple: Replace "tdbdump" with "ctdb cattdb"
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)
2012-04-27 15:40:43 +10:00
Martin Schwenke
6764b7b33e tests: Update README files and add new README files where missing
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit bef03b32f8ec114a64c55b25951aeeb939d87b33)
2012-04-27 15:40:43 +10:00
Martin Schwenke
f30d4c575e tests: Local daemons are no longer the default, now require run_tests -l
Testing with local daemons is the current default but this is not the
most common use case.  Therefore, we make local daemons optional by
using the -l switch with run_tests or by setting TEST_LOCAL_DAEMONS to
the number of daemons to be used (-l sets this to 3).

TEST_LOCAL_DAEMONS replaces CTDB_TEST_NUM_DAEMONS and
CTDB_TEST_REAL_CLUSTER is removed.

Most relevant logic is moved from ctdb_test_env to integration.bash.
ctdb_test_check_real_cluster() is moved from integration.bash to
complex/scripts/local.bash.

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

(This used to be ctdb commit 72ecae61c43b318ec94b527a12cbb0a382e8c3db)
2012-04-27 15:40:43 +10:00
Martin Schwenke
bf197d097f tests: Rename ctdb_test_functions.bash to integration.bash
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 79adb50b3ce3873c3baf9e6715c1d1c3f181ce43)
2012-04-27 15:40:43 +10:00
Ronnie Sahlberg
618d247420 Merge remote branch 'martins/master'
(This used to be ctdb commit abe7ebe6c531f912efe4ebc1daade4d2af67574c)
2012-04-18 13:48:43 +10:00
Martin Schwenke
d4785e813a Tests - turn of time logging by default
We haven't seen problems related to time jumps for a long time.  Turn
this off by default.

To switch it back on set $CTDB_TEST_TIME_LOGGING to any non-null
value.

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

(This used to be ctdb commit 2aa9bbf3a52dde0707eb06acd91e57c8da5c717f)
2012-04-16 14:57:44 +10:00
Amitay Isaacs
f2a5fda861 tests: Check assigned IPs from ctdb output
This fixes the test ctdb_config_add_ip when running against local daemons.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit b81c2c8a2360001fe73f9fd9aa1ba32665fdb0bb)
2012-04-13 14:51:13 +10:00
Amitay Isaacs
db13fd893c tests: Check for assigned IP addresses only if we are on real cluster
This fixes the ctdb_ip test when running against local daemons.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit a108fc14d90b6d552736d19b0ea104f2508dc331)
2012-04-13 14:51:13 +10:00
Amitay Isaacs
ea1c89566e tests: Add regular expression parsing for hop_count_buckets
This fixes the test to check ctdb statistics output.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 98c633ab4824e0e4d28ab2eb2532e16eb859bd94)
2012-04-13 14:51:13 +10:00
Ronnie Sahlberg
7698a5105e Add test for NoIPTakeover
(This used to be ctdb commit 79172330d10ae0d5a7e5bf724959c9e5784716b4)
2012-04-12 10:31:17 +10:00
Ronnie Sahlberg
b3ddf6901d Merge remote branch 'martins/master'
(This used to be ctdb commit af72f8bc05f78983f9624d81788f9d89af474b11)
2012-03-15 16:09:41 +11:00
Ronnie Sahlberg
f7b2adfde6 Test: add test tool and test that UPDATE_RECORD works on persistent databases
(This used to be ctdb commit f06634951331232cddf0b48eac3552b92aca5b93)
2012-03-12 16:10:09 +11:00
Ronnie Sahlberg
1cfefb406f TESTS: Add test for wipedb command
(This used to be ctdb commit 4ea05fef886b0680d0ad0936c239a51fd75bf000)
2012-02-16 10:19:15 +11:00
Martin Schwenke
bd41a2ae0d Tests - simple - make disconnected node tests handle changed error message
Recent changes to nodestring parsing generalised the error message
logged when trying to talk to a disconnected node.

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

(This used to be ctdb commit db69a39ca010b2c8853b13466e30792dda350cdb)
2012-02-13 13:32:25 +11:00
Ronnie Sahlberg
5082bba246 READONLY: add test for creating and revoking delegations
(This used to be ctdb commit a7e7fa2169ee12f817336f6d03d5bb72df7ec020)
2012-02-13 11:16:24 +11:00
Ronnie Sahlberg
770bba6718 TESTS: Add a test that verifies that RecoverPDBBySeqNum works as expected.
If this tunable is set to 1 AND the persistent database contains a record "__db_sequence_number__" then we will recover the whole database as-is instead of doing the record by record recovery

(This used to be ctdb commit 3e5d2b61fcb4d0062d2573d99724f630a4fc4622)
2012-02-08 08:59:53 +11:00