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

4128 Commits

Author SHA1 Message Date
Ronnie Sahlberg
73f8be16c6 ReadOnly: add per-database statistics to view how much delegations/revokes we have
(This used to be ctdb commit 751ed46197661eb841042ab6a02855a51dd0b17c)
2012-02-08 15:29:27 +11:00
Ronnie Sahlberg
1eafa68f0f STATISTICS: add total counts for number of delegations and number of revokes
Everytime we give a delegation to another node we count this as one delegation.
If the same record is delegated to several nodes we count one for each node.

Everytime a record has all its delegations revoked we count this as one revoke.

(This used to be ctdb commit b098bcf8007be63889aaed640a951b0eeaa9d191)
2012-02-08 13:42:30 +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
Ronnie Sahlberg
b6de9d3d19 Ad test tool to store data and ctdb header into a local tdb file
(This used to be ctdb commit c6433e43ad2481d84e8d9a1ee1c6e29b90423a86)
2012-02-07 12:14:57 +11:00
Ronnie Sahlberg
c3bab541c9 TFETCH add verbose flag to print also the record ltdb heaer
(This used to be ctdb commit 25d797f61c3b5b7090fb662adde6ed9e434e8a61)
2012-02-07 10:53:49 +11:00
Ronnie Sahlberg
daf28e095e CTDB: update tfetch so we can specify a hexadecimal string as key
(This used to be ctdb commit 70d22efdf104db1fc951263cedfbdb95b0b44342)
2012-02-07 10:21:12 +11:00
Ronnie Sahlberg
b7f0e0353f TESTS: ctdb_fetch needs to allow tevent nesting
(This used to be ctdb commit 4fa3f109b7ddc40e79c5fbb9688e0e830c0a655e)
2012-02-06 17:32:34 +11:00
Ronnie Sahlberg
0c6178e629 Merge remote branch 'martins/tests'
(This used to be ctdb commit 5f660e5bf321ae5332bf1d32c8af36d6cc2569f4)
2012-02-06 16:34:02 +11:00
Ronnie Sahlberg
307cc316ab Merge remote branch 'martins/takeover'
(This used to be ctdb commit 4948f34676d5bdaaf1ddf8879df618a76013ea1e)
2012-02-06 16:30:49 +11:00
Martin Schwenke
c7c19397cd Test - IP allocation simulation - add -e option to run the daemon's algorithm
A recent change in the deamon's (i.e. real) IP allocation algorithm
uses qsort(3).  This makes it very difficult to get the same results
in Python, since qsort's behaviour on identical keys is undefined.

Add a -e option to run "../bin/ctdb_takeover_tests ctdb_takeover_run_core"
instead of the internal Python algorithm.  We pass the current cluster
state and read it back from the output of the test program.

This is currently a rough hack.  Perhaps it'll be improved later...
:-)

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

(This used to be ctdb commit eed3f4988290bbe317a7aaa6f61826676dd8365a)
2012-02-06 16:03:01 +11:00
Martin Schwenke
840a9b8702 Tests - IP allocation simulation - LCP2 => non-deterministic
The default in this script is still deterministic IPs.  The LCP2
option should really turn off deterministic IPs.

Also fix a typo...

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

(This used to be ctdb commit c378a059b35fcc9955215a0095826c919d42153c)
2012-02-06 16:03:01 +11:00
Martin Schwenke
c497e4bc19 Tests: eventscripts - fix breakage in some NFS tests
1341329f6125d491b82c873f793af819e677f714 either contains typos or
attempts to influence the test depending on the host system.  Whatever
the cause, a test system (e.g. my laptop) might not have
/etc/sysconfig/nfs, so that can't be used to cause the stub
etc/sysconfig/nfs to be loaded.

We make the tests work by default again, leaving in some flexibility
over configuration file location.

If the goal is to force a Debian-style test mode then:

* The tests are currently probably quite RHEL-centric anyway, so more
  work is probably needed.

* Use an environment variable to indicate the distro test mode and
  make functions like setup_nfs() remove all of the various
  configuration files and create one in the distro-specific location.

I won't do this now... ENOTIME...

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

(This used to be ctdb commit 4aa4a5790ea9ad20e4d25404760c449b358b5260)
2012-02-06 16:02:09 +11:00
Martin Schwenke
4e01fedea5 Tests: eventscripts - make init test pass with recent change to 10.interface
e646142f4d28b5401235cd5edee325f7a29f8193 changes the output on the
init event.  This accommodates that change.

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

(This used to be ctdb commit 48cb55aae47d11487bdf004a79df56779d1825a0)
2012-02-06 16:02:09 +11:00
Martin Schwenke
6ba3e67796 Tests: new test to check that "ctdb delip" removes the IP from interface.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit a63e603cb7e21a7334c6a07bc4415ff089dab3c1)
2012-02-06 16:02:09 +11:00
Martin Schwenke
8bcad72c41 Tests - ctdb tool - add verbose option and output filtering
Need to filter dates before comparing...

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

(This used to be ctdb commit 6127515ea62173ff1574d1217129ec05a8fbeb3f)
2012-02-06 16:00:24 +11:00
Martin Schwenke
a856514c28 Tests - ctdb tool - fix "ctdb status" test
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 47e86c33d768816d03817124481bb6aa967bf2a6)
2012-02-06 16:00:24 +11:00
Martin Schwenke
72961bc163 Tests - let run_tests.sh take a list of tests to run
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit fa00bbf7d7378eecb5ba77684d01db90c9370bca)
2012-02-06 16:00:24 +11:00
Martin Schwenke
9f2ce614a7 Tests: initial ctdb tool testcases
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 47e9975fa75a7bb2628a751dc19d35e2c5c57ce3)
2012-02-06 16:00:24 +11:00
Martin Schwenke
e420c6b801 Tests: fix usage message in ctdb_tool_libctdb
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit ca1d2bb62e61b7d723a648b3a9b146e258efcabb)
2012-02-06 16:00:24 +11:00
Martin Schwenke
ed9eecb6bb Tests: libctdb stubs should fail when current node disconnected
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f96954b42b03f810f7b1732b5fe00c5dab2d8cb8)
2012-02-06 16:00:24 +11:00
Martin Schwenke
31487f31df Tests - add a version of the ctdb tool that compiles against libctdb stubs
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 6c79b951c3ae68238f8dbd836ceca6c1187eaabe)
2012-02-06 16:00:24 +11:00
Martin Schwenke
e2ceae48e3 ctdb tool - free some memory used by popt
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 7339e87019c0ab44522bf160234307472c05dc14)
2012-02-06 16:00:24 +11:00
Martin Schwenke
7a1ed19578 Tests - allow tools/ctdb.c:main() to be used
We'll need stubs somewhere else...

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

(This used to be ctdb commit 6f29c39d666485fddef60e9d87bf94082d179ebb)
2012-02-06 16:00:23 +11:00
Martin Schwenke
4bf69a0fff Tests - more libctdb stub test infrastructure
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 25a0136bd773e7ed8dfda635471f0498d4a7afe9)
2012-02-06 16:00:23 +11:00
Martin Schwenke
ea22ce5c72 Tests - more libctdb stubs and supporting state faking functions
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 9bfc3b04ffeca056d8507d1cc8bc20f56c8e1572)
2012-02-06 16:00:23 +11:00
Martin Schwenke
7a04587e88 ctdb tool - convert control_status() over to use just libctdb()
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit abe9985e503d998cf597933a594b445de8d3cec6)
2012-02-06 16:00:23 +11:00
Martin Schwenke
ed8a8ee966 libctdb - add ctdb_getvnnmap()
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f6039eaece4224b866a98dd49010f278a7b3f015)
2012-02-06 16:00:23 +11:00
Martin Schwenke
97863216ed Tests - update test code for ctdb tool code and libctdb stubs
Rename ctdb_parse_nodestring.c to ctdb_tool_libctdb.c.  It can contain
many tests.

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

(This used to be ctdb commit d597020af01dfcdf0d39e1cf579bf33f43f87dda)
2012-02-06 16:00:23 +11:00
Martin Schwenke
bfab62dd41 ctdb tool - Fix parse_nodestring() related issues
An old, buggy version of this code was merged.  This fixes it.

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

(This used to be ctdb commit bc4d5d5f0048487776f9f5d9f04a0af2e5d45aac)
2012-02-06 16:00:23 +11:00
Ronnie Sahlberg
e3b85bba3f Add a hoook to the ctdb initscript that we can call out to for applications that want to
track and produce audit logs when someone runs "service ctdb <something>"

S1033891

(This used to be ctdb commit 4f4fbd4080a3a7226d3b82637f803c4b71217d39)
2012-02-06 12:07:08 +11:00
Ronnie Sahlberg
64f107f528 ReadOnly update documentation
(This used to be ctdb commit e1da34874f22ec3de0c4abe50b703dd637f1fa98)
2012-02-01 13:47:49 +11:00
Ronnie Sahlberg
0d084a9bfa ReadOnly: update the loop test tool to print number of fetches per second
(This used to be ctdb commit f53c66a5e0dc5351b86b81dc5b1faea757981d4c)
2012-02-01 09:32:02 +11:00
Ronnie Sahlberg
65e1e1d3ef Niceify the readonlyrecord API. Dont force clients to be exposed to the featch_with_header function
We dont strictly need to force clients to use CTDB_FETCH_WITH_HEADER instead of CTDB_FETCH when they ask for readonly records.
Have ctdbd internally remap this internally to FETCH_WITH_HEADER and map the reply back to CTDB_FETCH_FUNC or CTDB_FETCH_WITH_HEADER_FUNC based on what the client initially asked for.

This removes the need for the client to know about the CTDB_FETCH_WITH_HEADER_FUNC function and simplifies the client code.
Clients that do not care what the header after the request is can just continue using the old CTDB_FETCH_FUNC call and ctdbd will do all the difficult stuff.

(This used to be ctdb commit 444a7bac4e9a854b06c1ad4cb36c2b58a72001fa)
2012-01-31 17:20:35 +11:00
Mathieu Parent
f6c22fe485 Define ETIME on non-supporting platforms
e.g. kFreeBSD, NetBSD, ...

(This used to be ctdb commit ee3ef9004be8feeefa6e450eb5bb084cc6812370)
2012-01-31 14:14:25 +11:00
Mathieu Parent
33b7470e82 Add kFreeBSD support
(This used to be ctdb commit c75e4ad9b566e47dec66d25988da4cee861c2357)
2012-01-31 14:14:21 +11:00
Volker Lendecke
9ebc00637d Fix a cut&paste error
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit 488de939b78125ac38822760102e05298a5e70c5)
2012-01-18 12:25:38 +01:00
Michael Adam
0832daf1e9 server: fix a comment typo
(This used to be ctdb commit 85879edd09ffa26f87c566954cbd2c14f1e331ed)
2012-01-10 10:33:28 +01:00
Ronnie Sahlberg
b5b4c1a2ea explain why we use FIONREAD
(This used to be ctdb commit d0f85478c37828eb8a24315d4326eb4eaedb9afc)
2012-01-04 21:41:12 +11:00
Ronnie Sahlberg
e648045499 Merge branch 'master' of ssh://git.samba.org/data/git/ctdb
(This used to be ctdb commit 15d8ae8b0f80f95d7839528b8ac60aa0e2485c77)
2012-01-03 12:40:15 +11:00
Ronnie Sahlberg
b417300668 Merge remote branch 'martins/nodestatus'
(This used to be ctdb commit adcb076612c56f92cfb6f3ba90721981a067a494)
2012-01-03 12:31:37 +11:00
Michael Adam
bf99bb65e0 vacuum: improve logging in remove_record_from_delete_queue()
(This used to be ctdb commit 809d1f3b8a9232fce0376cb47e4f633b49237529)
2011-12-23 17:39:13 +01:00
Michael Adam
ca7d2bf63a vacuum: improve logging in delete_record_traverse()
(This used to be ctdb commit 40ca781b3305d9f0bfee5b109d4eefde461a3f13)
2011-12-23 17:39:13 +01:00
Michael Adam
8348c431f2 vacuum: improve logging in insert_record_into_delete_queue()
(This used to be ctdb commit db59ac2ee6a9f5f7f088ebbc5e2800d9e57aae17)
2011-12-23 17:39:13 +01:00
Michael Adam
0a6805eed0 vacuum: improve debugging in delete_queue_traverse()
(This used to be ctdb commit 2c44c6dc583872c603a399afb01936abcbb05158)
2011-12-23 17:39:13 +01:00
Michael Adam
26cac0627e vacuum: add debug message to insert_record_into_delete_queue() for failed insert
(This used to be ctdb commit ae78e8d991636a3a79dd9fbcefc15032afb08f55)
2011-12-23 17:39:12 +01:00
Michael Adam
190b1b240c vacuum: improve debugging in insert_record_into_delete_queue()
(This used to be ctdb commit 6e6aaba28ac560d51d7450ebcf99babf868d0aea)
2011-12-23 17:39:12 +01:00
Michael Adam
cb259e6bd1 vacuum: initialize (to zero) the vacuum fetch list in ctdb_vacuum_init_vacuum_data()
(This used to be ctdb commit 772e08c29ef70a4cc73f7887939e5071a90a98cb)
2011-12-23 17:39:12 +01:00
Michael Adam
d29b2bd8bd vacuum: add statistics output for processing of the delete list
(This used to be ctdb commit bec2ff46402b6d90521c75e8d46b9f6f2f47239a)
2011-12-23 17:39:11 +01:00
Michael Adam
7a79e77c1f doc:ctdb.1: add generated files after update
(This used to be ctdb commit 4f23976fad3de63a47cf81d26dff1973d025e262)
2011-12-23 17:39:11 +01:00
Michael Adam
b3f5c4b238 doc:ctdb.1: explain that "ctdb listvars" does not list obsolete tunables any more
(This used to be ctdb commit 4ed94279f243729d521d365a44607fd086ae7c41)
2011-12-23 17:39:11 +01:00