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

4351 Commits

Author SHA1 Message Date
Ronnie Sahlberg
c47da8b028 Log the "Received SHUTDOWN ..." first in the shutown process instead of last.
Sometimes ctdb is termnated ifrom the initscript if the shutdown takes too long an no message is logged.

(This used to be ctdb commit d3542d43141c1548bab356fbdef34dfedb4f167f)
2012-02-21 19:00:33 +11:00
Ronnie Sahlberg
574b47e23f Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit 9b85aa1aa14091dc1de470a587f7c054b9e40078)
2012-02-21 07:12:50 +11:00
Ronnie Sahlberg
42e477b14e READONLY: only send a control to schedule fast-vacuuming from child context iff we have a connection open to the main daemon
there are some child processes where we do not create a connection to the main daemon (switch_from_server_to_client()) because it is expensive to set up and we normally might not need to talk to the daemon at all via a domainsocket.
but we might want to still call to ctdb_ltdb_store() from such chil processes.

(This used to be ctdb commit 9e372a08c40087e6b5335aa298e94d88273566a5)
2012-02-21 07:03:44 +11:00
Ronnie Sahlberg
cdc232f2dd READONLY: dont schedule for fast vacuum deletion if any of the readonly record flags are set
(This used to be ctdb commit b3307d78fd15f446b423f8cdd1e403f89fbe8ac8)
2012-02-21 06:54:09 +11:00
Ronnie Sahlberg
af424b151c Revert "ReadOnly: We can not use ctdb_ltdb_store from a client/child context since"
This reverts commit 11dee7f3f881494cf5089d6c69fd40e74f07e670.

Try to solve this a different way so that ctdb_ltb_store() becomes safe to use also from child context

(This used to be ctdb commit 5990fe65a9cc37933ceff15d4cb2ab3b3a0addb6)
2012-02-21 06:49:18 +11:00
Ronnie Sahlberg
baa3d7ea39 Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit 0fd3bf919b1b8e5aaa98444c306c6770a6a3209f)
2012-02-20 21:30:13 +11:00
Ronnie Sahlberg
9323afa386 ReadOnly: We can not use ctdb_ltdb_store from a client/child context since
it sometimes (for empty records) needs to be able to initiate traffic unde rhte daemon context.

This should furhter updated later to allow the use also from non-daemon context.

(This used to be ctdb commit 11dee7f3f881494cf5089d6c69fd40e74f07e670)
2012-02-20 21:22:56 +11:00
Ronnie Sahlberg
61762a96e3 ReadOnly: Make sure we dont try to fast-vacuum records that are set for readonly delegation
(This used to be ctdb commit 303134cf10a08ce61954d5de9025d9bbcb5f75ef)
2012-02-20 21:13:46 +11:00
Ronnie Sahlberg
40906c0e7b Merge branch 'master' of ssh://git.samba.org/data/git/ctdb
(This used to be ctdb commit d3c54ae9cc83f74d15f40bbfff95404b270d2f80)
2012-02-20 09:54:52 +11:00
Michael Adam
64208e04a5 Fix the build on freebsd9. (typo in flags?)
(This used to be ctdb commit 650bb17335876f3e91e76a47b748c9236d0f3045)
2012-02-18 12:35:19 +01: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
Volker Lendecke
3d71e9f7f0 Add common/system_freebsd.c
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit 89067e12b868974f9909b447ab5e202d612ac44f)
2012-02-13 16:32:35 +01:00
Volker Lendecke
8428f48708 Add includes required on FreeBSD
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit be5c3a57df39d85fbb7ee922924787340e2b0595)
2012-02-13 16:23:17 +01:00
Volker Lendecke
5e3b13a32a FreeBSD does not define s6_addr32, only s6_addr
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit d657af4fb68ce3f7c462856f2934f6bf169e120b)
2012-02-13 16:20:12 +01:00
Volker Lendecke
cb44ebbc95 Make CTDB_CURRENT_NODE work with CTDB_REQ_MESSAGE
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit be8a153346ca7d40f09a6d03aad655aaa5c4a903)
2012-02-13 15:50:56 +01:00
Martin Schwenke
88c74987dc Tests - functions/environment - set and use $CTDB_NODES
"ctdb listnodes" changed so that it never tries to contact the daemon
but reads the local nodes file instead.  This fails if the nodes file
is in a non-default place but $CTDB_NODES isn't set.

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

(This used to be ctdb commit a7ad2fb75f06791508dd928d2a0c305fc7f7b814)
2012-02-13 13:34:57 +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
Martin Schwenke
629553667e ctdb tool: fix thinko in nodestatus command output
If used with -n <nodes> the "current" node needs to change.

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

(This used to be ctdb commit a0340a50c2acd9ccc281faef032a364254f7f95a)
2012-02-13 13:31:18 +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
4af0b6115f READONLY: Update the fetch-readonly-once test tool to use CTDB_SOCKET if set
(This used to be ctdb commit f4d395165816f74839ed48860e3210e05bc16d3d)
2012-02-13 11:06:45 +11:00
Ronnie Sahlberg
a9d983431d READONLY: document the command to activate readonly record support
(This used to be ctdb commit f0bc1760c36c8589f58354c50b23880946cb57c6)
2012-02-13 10:34:41 +11:00
Ronnie Sahlberg
68245eee4e READONLY: allow specifying the db name for setdbreadonly instead of just the hash
(This used to be ctdb commit 3c2117e8e4156e0048fbd2c94546112f0c588522)
2012-02-13 10:27:59 +11:00
Mathieu Parent
938bb15ad9 Load platform dependent objs instead of Linux one
This fix compilation on Gnu/Hurd and kFreeBSD

See also:
https://buildd.debian.org/status/fetch.php?pkg=ctdb&arch=hurd-i386&ver=1.12%2Bgit20120201-1&stamp=1328211119
https://buildd.debian.org/status/fetch.php?pkg=ctdb&arch=kfreebsd-amd64&ver=1.12%2Bgit20120201-1&stamp=1328214761
https://buildd.debian.org/status/fetch.php?pkg=ctdb&arch=kfreebsd-i386&ver=1.12%2Bgit20120201-1&stamp=1328215875

(This used to be ctdb commit 496e8f8540f78606ef23ee8fa100eb2b2cf3f106)
2012-02-11 11:15:06 +11:00
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