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

146 Commits

Author SHA1 Message Date
Andrew Tridgell
f2fb717402 merge from ronnie
(This used to be ctdb commit 0a91fe52f34d997c1a3cde0fa356deaaf290a4a9)
2007-08-15 11:48:03 +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
Ronnie Sahlberg
9525b010aa add helpers to add/lookup/delete nodes in a tree where the key is an
array of uint32

(This used to be ctdb commit b7e0996e7735c8629d07453b9d335990c2dbc3db)
2007-08-08 12:30:12 +10:00
Ronnie Sahlberg
c1bfda5772 add a tree insert function that takes a callback fucntion to populate
the data of the tree.
this callback makes it more convenient to manage cases where one might 
want to insert multiple entries into the tree with the same key

rename the tree->tree pointer to tree->root  since this is supposed to 
point to the root of the tree

add a small test utility

(This used to be ctdb commit f6313bed9c53e0d1c36c9e08ac707e88e2a4fcd5)
2007-08-08 11:21:18 +10:00
Ronnie Sahlberg
64f61364a7 add a small tool to compare rb tree with a timeval_compare()+add an
entry to the end of the list DLIST (worst case insert)

(This used to be ctdb commit dcdf4a1f1c6675ae11ab26726c867d7782954fc6)
2007-07-30 10:50:35 +10:00
Andrew Tridgell
32de198fd3 update lib/replace from samba4
(This used to be ctdb commit f0555484105668c01c21f56322992e752e831109)
2007-07-10 15:29:31 +10:00
Andrew Tridgell
732353de5f - merged ctdb_store test from ronnie
- added DatabaseHashSize tunable
- added logging of events inside recovery (for timing)

(This used to be ctdb commit 3593cdb928b91e217faf1b3c537fa28dc82cdace)
2007-06-17 23:31:44 +10:00
Ronnie Sahlberg
cddf988961 add a small test tool that can be used to create a massive amount of
records in the test database.

the tool first creates the number of records requested, then it will 
loop infinitely reading the records out again.

(This used to be ctdb commit dca2497097a9cdff268b1e5d446f6feb71bfb389)
2007-06-17 11:13:42 +10:00
Andrew Tridgell
2b91099585 support up takeover in testing when root
(This used to be ctdb commit df409156e685373ea98986511149c9fba3a8c812)
2007-06-09 21:47:06 +10:00
Andrew Tridgell
b50096c835 more code rearrangement
(This used to be ctdb commit 2bcf3b16163041f03add2e5bf9f1f5fb3599ec24)
2007-06-07 22:16:48 +10:00
Andrew Tridgell
2ed57a9ae1 implement a scheme where nodes are banned if they continuously caused the cluster
to start a recovery session. The node is banned from the cluster for the RecoveryBanPeriod (default of 5 minutes)

(This used to be ctdb commit 4ad43dd07f526b6002477177fbf55483246c2c0c)
2007-06-07 15:18:55 +10:00
Andrew Tridgell
cafddf76dc - fixed flags display in logs
- added monitor handler to test event script

(This used to be ctdb commit a4c18dddee169df49e5d77d9a94ce9329f169319)
2007-06-06 11:13:24 +10:00
Andrew Tridgell
dbb2ec43dd added tunables settable using ctdb command line tool
(This used to be ctdb commit 73d440f8cb19373cfad7a2f0f0ca4f963c57ff29)
2007-06-04 19:53:19 +10:00
Andrew Tridgell
f1d81386e6 - start moving tunable variables into their own structure
- fixed the test scripts to use a separate dbdir

(This used to be ctdb commit 396752e8908c48373564e915e2d49cfc9ff61eba)
2007-06-04 17:46:37 +10:00
Andrew Tridgell
a57991c0eb remove some cruft thats not needed any more
(This used to be ctdb commit c4308805b997740b77e058c1a14b84cb400a7c30)
2007-06-04 17:23:55 +10:00
Andrew Tridgell
90158f7ad7 removed some old cruft
(This used to be ctdb commit 44040d5ecabcd32ee26c0285e3786dfb9b4f8126)
2007-06-02 19:23:48 +10:00
Andrew Tridgell
c5e4ce360a make test now works again
(This used to be ctdb commit 439d87bbb9840f82937e51aff4fe2b80160878c6)
2007-06-02 13:31:36 +10:00
Andrew Tridgell
68963d865a first step towards fixing "make test" with the new daemon system
(This used to be ctdb commit f95f7e4c93dea482e6cf0614b5415229a7c9f3fb)
2007-06-02 13:16:11 +10:00
Andrew Tridgell
ebf12646cf - make specification of a recovery lock file compulsory
- die if someone other than the recmaster can get the recovery lock

(This used to be ctdb commit a827d0d0e430ca8ad5d521367e45097185492869)
2007-06-02 11:36:42 +10:00
Andrew Tridgell
b5890ad2c1 split out events for each subsystem separately
(This used to be ctdb commit 03c629a72f234dcc783fa1085e7edba09597c241)
2007-06-01 20:54:26 +10:00
Andrew Tridgell
869d70d9c9 convert ctdbd.sh tests to use an event script
(This used to be ctdb commit b3eff804fe59238ed37cd692cc04785089a89dc3)
2007-06-01 19:04:51 +10:00
Andrew Tridgell
bf3b740a1b ctdb is GPL not LGPL
(This used to be ctdb commit 8624378010d1c2a1438e1e701339dfba7276f960)
2007-05-31 13:50:53 +10:00
Andrew Tridgell
2d9e0ad56a use /etc/services for ctdb
(This used to be ctdb commit 64bf6964ff33320c5351337c7f8ed4da5bd71275)
2007-05-29 15:15:00 +10:00
Andrew Tridgell
ccf4d78e04 - renamed ctdb_control utility to ctdb
- use -n to specify node number in ctdb utility

- change 'ctdb status' to 'ctdb statistics'

- added 'ctdb status' which shows status

- added netmask to public IPs, so you don't try a takeover on a
  foreign network

- cleaned up tools/ctdb_control.c a lot

- generate usage message at runtime

(This used to be ctdb commit 28de71c03ace7d32a9fd9882fabbd5d668b97656)
2007-05-29 12:16:59 +10:00
Andrew Tridgell
a5198559c9 moved the recovery daemon into the main ctdbd and enable it by default
(This used to be ctdb commit 2a7d42124731f43d013cb76a798525eab4cc1ee0)
2007-05-15 15:13:36 +10:00
Andrew Tridgell
682df74d59 separate the wire format and internal format for the vnn_map
(This used to be ctdb commit 9a71718d87c5162f1423d85c2e86a01f6771925e)
2007-05-10 08:13:19 +10:00
Ronnie Sahlberg
6929739b7f add a command line flag to ctdbd to start a recovery daemon.
update the recovery test script to start all ctdb daemons with a 
recovery daemon

(This used to be ctdb commit 47794e16df285cacefc30208d892d931a6e46b96)
2007-05-09 09:59:23 +10:00
Ronnie Sahlberg
c6bd23ee11 update to rhe recovery daemon
ctdb_ctrl_ calls are timedout due to nodes arriving or leaving the 
cluster it crashes the recovery daemon afterwards with a SEGV but no 
useful stack backtrace

(This used to be ctdb commit cd3abc7349e86555ccd87cd47a1dcc2adad2f46c)
2007-05-06 06:58:01 +10:00
Ronnie Sahlberg
60d4b0e8b4 in the recover test
start the daemons with explicit socketnames and explicit ip address/port

remove all --socket=  from all ctdb_control calls since they are not 
needed anymore

(This used to be ctdb commit 593a959d428f5b4a913117a9b5c8fe65a3eb950e)
2007-05-06 06:06:39 +10:00
Ronnie Sahlberg
7bbcc964f2 add support in catdb to dump the content of a specific nodes tdb instead
of traversing the full cluster.
this makes it easier to debug recovery

update the test script for recovery to reflect the newish signatures to
ctdb_control



the catdb control does still segfault however when there are missing 
nodes in the cluster   as there are toward the end of the recovery test

(This used to be ctdb commit 8de2a97c14a444f817ceb36461314f10c9601ecc)
2007-05-06 05:53:15 +10:00
Ronnie Sahlberg
25edbc9a50 add a control to get the pid of a daemon.
this makes it possible to kill a specific daemon in the recover test 
script

(This used to be ctdb commit 2fa394b4c80988cb1a6d04b236ec64cc9d9e8a40)
2007-05-06 04:31:22 +10:00
Ronnie Sahlberg
508cafd17e merge from tridge
(This used to be ctdb commit 6c8b90cedc67daa89d54db5268fde18bfc20abaf)
2007-05-04 17:05:28 +10:00
Ronnie Sahlberg
418cb36d32 remove a exit from the test script
(This used to be ctdb commit 4adb61f8270dbd15732bc458d49a66138dd240cc)
2007-05-04 15:25:57 +10:00
Ronnie Sahlberg
7dfdab1b9d recovery daemon
this program is a client to the local ctdb daemon

every second it pulls all vnnmap and nodemaps from all nodes that are 
available and checks if a recovery is required

a recovery is required if :
* all nodes do NOT have an identical vnnmap and generation
* all nodes do NOT have an identical nodemap
* there are active nodes that are NOT in the nodemap
* there are nodes in the nodemap that are NOT active

During recovery,  the recovery tool will also make sure that all nodes 
know about and have created all databases.

(This used to be ctdb commit 2f2650467bac7e8954de7c17cb34f46b0bdbcd26)
2007-05-04 15:21:40 +10:00
Andrew Tridgell
f2fd53056d nicer interface to ctdb traverse
(This used to be ctdb commit e5ce866dcc5037b5069e42bf1e168b646f007b01)
2007-05-04 12:18:39 +10:00
Andrew Tridgell
e752f3bd97 - changed the REQ_REGISTER PDU to be a control
- allow controls to know which client invoked them

- added a client_id to clients, so they can be identified remotely

- added the ability to remove registered srvids

- in the list_keys code, register a temp srvid, then remove it afterwards

(This used to be ctdb commit 29603c51cc6d81362532cd8e50f75c8360c5f5ef)
2007-05-04 11:41:29 +10:00
Andrew Tridgell
648e3835b3 merge from ronnie
(This used to be ctdb commit cf23175526d8fde1ef145605fb545584384b6cec)
2007-05-04 10:43:39 +10:00
Andrew Tridgell
60b42276eb first version of traverse is working
(This used to be ctdb commit ecac90cee389a6fa0e9b1efba521e098a24d323f)
2007-05-03 17:12:23 +10:00
Ronnie Sahlberg
fe24692d46 do a real recovery by killing a node and then calling the recover
control

(This used to be ctdb commit f8d97f8b56f0af83a514ec0364eb915e2d5ea2d7)
2007-05-02 21:31:20 +10:00
Ronnie Sahlberg
97504b62e2 recover.sh test script that build a few database and populates them with
a record  then performs a recovery which merges all records onto node 0

(This used to be ctdb commit 54a072deb40d8d4a4a9e35bfde0eec3c867211d0)
2007-05-02 21:14:37 +10:00
Ronnie Sahlberg
206fb1fd3b add a recover test change alignment for the pull/push db structures
(This used to be ctdb commit 0eb45623ca103e69765ed577ae02e7f8ca777e37)
2007-05-02 21:00:02 +10:00
Ronnie Sahlberg
c06c1e1f9f remove sleep from the fetch test
add a test script to start 4 daemons to test recovery

(This used to be ctdb commit 09eab12b00934afa5159fc500faf6b07effb2804)
2007-05-02 13:14:12 +10:00
Ronnie Sahlberg
d20990c2b6 add a control to create a database
(This used to be ctdb commit 74e489c6737cc79537c7812ea82daafb1b363ec2)
2007-05-02 12:43:35 +10:00
Ronnie Sahlberg
1f84807005 remove test code in the fetch test to keep the daemons running forever
(so one has lots of tiume to play with ctdb_control)

(This used to be ctdb commit 8fbaf82a7b3f0e62c887e91731ad8c659122c785)
2007-05-02 11:09:10 +10:00
Ronnie Sahlberg
3a891c6676 merge with tridges tree to resolve all conflicts
(This used to be ctdb commit 0f7c6c580ef0de60af68fd22bce36c0c0b2515b0)
2007-05-02 10:53:29 +10:00