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

498 Commits

Author SHA1 Message Date
Ronnie Sahlberg
c9aafae5ce dont allocate arrays where we can just return a single integer
(This used to be ctdb commit 07bc338e490e0f7018808a2450bc54863eb88c94)
2007-05-06 08:05:22 +10:00
Ronnie Sahlberg
dceab7ff3e dont use arrays where a uint32_t works just as well
(This used to be ctdb commit 843e974b29c93df891ae7cf13323ee960a334f60)
2007-05-06 07:52:20 +10:00
Ronnie Sahlberg
ad41dff7bf add a ifdeffed out block to the call.
we really should kill the event in case the call completed before the 
timeout   so that we can also make timed_out non-static

(This used to be ctdb commit f297eed589b1d4e188f77f195683365cf91d0e62)
2007-05-06 07:32:16 +10:00
Ronnie Sahlberg
4f2cdc2d8b hte timed_out variable needs to be static and can not be on the stack
since if the command times out and we return from ctdb_control   we may 
have events that can trigger later which will overwrite data that is no 
longer in our stackframe

(This used to be ctdb commit 93942543092be618c0bd8ef68b470b0789bad7ad)
2007-05-06 07:07:47 +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
0f6d9c73d8 merge from tridge
(This used to be ctdb commit 08173e3ab77178b9841db0081a51b93291d9e8dc)
2007-05-06 04:38:41 +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
Andrew Tridgell
a3c70ac520 merge relevant lib code from samba4
(This used to be ctdb commit 8076a7c7e12da6d59bae31a2e4a0267d87c7b1b3)
2007-05-05 17:46:54 +10:00
Andrew Tridgell
7d48810645 merged vnn map broadcast from ronnie
(This used to be ctdb commit c0fa029435fdaa0be006b28eddb6b31beb2ee605)
2007-05-05 17:35:28 +10:00
Andrew Tridgell
542b76136e - take advantage of the new EVENT_FD_AUTOCLOSE flag
- use the tdb_chainlock_mark() call to allow us to guarantee forward progress in the ctdb_lockwait code

(This used to be ctdb commit e201e98aad0fef6a779a80f3b1ae7792953e2d6b)
2007-05-05 17:19:59 +10:00
Andrew Tridgell
cc8ac1ca6b allow the events system to be chosen on the command line
(This used to be ctdb commit 2fe976d7a376a763472cc7952a78b6249ce416c8)
2007-05-05 17:18:43 +10:00
Andrew Tridgell
24ed74a454 use the new lib/events autoconf code
(This used to be ctdb commit fec779711e8c4d6e047d792aee744e60e5a9f67c)
2007-05-05 17:18:06 +10:00
Andrew Tridgell
3bfeb3d235 - added a EVENT_FD_AUTOCLOSE flag that allows you to tell the event system to close the fd automatically when a fd_event is freed. This prevents races which can lead to epoll missing events
- added autoconf rules for automatically building with epoll support

(This used to be ctdb commit 4d113298b26f7163992f2e47429c953bd4f957c9)
2007-05-05 17:17:25 +10:00
Andrew Tridgell
d903e9542d added tdb_chainlock_mark() call, which can be used to mark a chain locked without actually locking it. This will be used to guarantee forward progress in the ctdb non-blocking lockwait code
(This used to be ctdb commit 2af98c3418496b39106c7282f550049ec8239657)
2007-05-05 17:14:33 +10:00
Ronnie Sahlberg
2e64727079 merge from tridge
(This used to be ctdb commit 8648104f8d76d22427c14422b126f7e979cc2d95)
2007-05-05 16:51:34 +10:00
Andrew Tridgell
9636c97c5a show number of connected clients in status output
(This used to be ctdb commit 99765bbe327bfe9c43415f4943281458f25be51b)
2007-05-05 14:09:46 +10:00
Ronnie Sahlberg
5cb817f031 split the vnn broadcast address into two
one broadcast address for all nodes
and one broadcast address for all nodes in the current vnnmap

update all useage of the old flag to now only broadcast to the vnnmap
except for tools/ctdb_control where it makes more sense to broadcast to 
all nodes

(This used to be ctdb commit dfb65b88cf67ad9d61268c4b47a6d8ae346f47df)
2007-05-05 13:17:26 +10:00
Ronnie Sahlberg
86b78a5d04 merge from tridge
(This used to be ctdb commit ea45ffe3fe479d49b6ed47cb545ee662655f6187)
2007-05-05 11:46:44 +10:00
Andrew Tridgell
410d41480a added a dumpmemory control, used to find memory leaks
(This used to be ctdb commit 44fdafaf421e3e906796d529aed2f7c5df201b94)
2007-05-05 11:03:10 +10:00
Andrew Tridgell
adc64aed0a - fixed a crash bug after client disconnect in ctdb_control
- added total memory used to ctdb_control status output

(This used to be ctdb commit a99ffe4372edc63d83d8c8ebf9a60b3413301f5a)
2007-05-05 08:33:35 +10:00
Andrew Tridgell
d8f4e6b209 - added counters for controls in ctdb_control status
(This used to be ctdb commit 858061372fc9902837a1a5b8bcfc0ada58eec193)
2007-05-05 08:11:54 +10:00
Andrew Tridgell
bdad1edcb5 merged from ronnie
(This used to be ctdb commit 88f0977f303836b50aa9239a9eb3447646bc1e3f)
2007-05-05 07:39:23 +10:00
Ronnie Sahlberg
1725fcf294 merge from tridge
(This used to be ctdb commit 62574808ef4dcb76760f1dd2496fbe8e34197c23)
2007-05-05 01:22:30 +10:00
Andrew Tridgell
fccc585f5a added seqnum propogation code to ctdb
(This used to be ctdb commit be2572b1b09eaaa1ea6a726d60f16996f9407d13)
2007-05-04 22:18:00 +10:00
Ronnie Sahlberg
508cafd17e merge from tridge
(This used to be ctdb commit 6c8b90cedc67daa89d54db5268fde18bfc20abaf)
2007-05-04 17:05:28 +10:00
Andrew Tridgell
ed3e847785 added a ctdb control for enabling the tdb seqnum
(This used to be ctdb commit c66920d9fb08a4a33418e2c1dcf1fc320fba3761)
2007-05-04 15:33:28 +10:00
Andrew Tridgell
6bc3758082 added a tdb_enable_seqnum() function
(This used to be ctdb commit 1f89da231c6637e339d5da156d6a48340706fe61)
2007-05-04 15:29:10 +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
5c4a477120 make catdb take a dbname instead of an id
(This used to be ctdb commit 365346345c33d2f310bb23d0c6ab5c3ed5e6e938)
2007-05-04 13:25:30 +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
Ronnie Sahlberg
b3c8d6ea7a also verify that the generation id is the same on all the nodes and if
not, trigger a recovery

(This used to be ctdb commit 46b8a66ee70419c153acf45eeec88c1fc8f230ce)
2007-05-04 11:57:45 +10:00
Ronnie Sahlberg
da545cea84 merge from tridge
(This used to be ctdb commit 5724d41352df252151e54ecdb02baa7f82c3aabf)
2007-05-04 11:51:07 +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
Ronnie Sahlberg
2b1714a521 update getvnnmap control to take a timeout parameter
dont explicitely free the vnnmap pointer in the getvnnmap control  this 
is freed by the mem_ctx instead

add code to the recoverd to detect when/if recovery is required
veiry that the number of active nodes, the nodemap and the vnn map is 
consistent across the entire cluster and if not   trigger a recovery 
(which right now just prints "we need to do recovery" to the screen.

(This used to be ctdb commit 2b0a207a3748bdb3394dc9fd0d1c344ee1bb0bb5)
2007-05-04 09:45:53 +10:00
Ronnie Sahlberg
ae73784c28 change the signature for ctdb_ctrl_getnodemap() so that a timeout
parameter is added.
change ctdb_get_connected_nodes in the same way

(This used to be ctdb commit d85f23bcf4c1230225abb2f4a053c70b68d469aa)
2007-05-04 09:01:01 +10:00
Ronnie Sahlberg
be17d4d181 ctdb_control should use the provided timeout and not hardcode to 1.0
seconds

(This used to be ctdb commit 03acb2f450578f6195ab2d0a598f6720e33e7cfb)
2007-05-04 08:32:02 +10:00
Ronnie Sahlberg
ebc478749b start working on a recovery daemon
change ctdb_control so it takes a timeval pointer as argument.
this is the timeout. if the node has not responded within hte timeout
ctdb_control will return an error instead of hanging.
if the timeval pointer is NULL then the call will block indefinitely if 
there is no response.

this is used for now in the createdb control   but all the helpers 
ctdb_ctrl_* should probably be updated to take a timeout parameter as 
well.

(This used to be ctdb commit 1fe64b04869b17dbf123851b0fe09df8d28a6211)
2007-05-04 08:30:18 +10:00
Ronnie Sahlberg
63f42d3ff8 merge from tridge
(This used to be ctdb commit fb8ac93c7dfc11e774ef1ce05b0d0df1de56a621)
2007-05-03 17:16:38 +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
14724b504b cleanup the control "write record"
(This used to be ctdb commit 4dd5c26a21a5dc2b2f76eb23cfeb4df82ba4e956)
2007-05-03 16:18:03 +10:00
Ronnie Sahlberg
e7cd7e4cde merge from tridge
(This used to be ctdb commit abf4c9d0cccd937a7036bd03b1b4c6e635c8eb58)
2007-05-03 14:42:53 +10:00
Andrew Tridgell
486c6b4fce merged from ronnie
(This used to be ctdb commit 57a80110ddfd202f8de37297db76dc43a064e476)
2007-05-03 13:53:54 +10:00
Andrew Tridgell
de0f848556 don't zero beyond packet header unnecessarily
(This used to be ctdb commit 4cf88ca2ce81db8fe10b0dfedb81d99a2bd93328)
2007-05-03 13:44:27 +10:00
Ronnie Sahlberg
d88154b24a cleanup getnodemap
(This used to be ctdb commit 3867ccf71a167fb82dbc5a3f03f968a325a0c70b)
2007-05-03 13:30:38 +10:00
Ronnie Sahlberg
633ae7f346 fixup getdbmap control so it looks a bit nicer
(This used to be ctdb commit 78a4d61cb78da20af5210488e685c91bc3023e90)
2007-05-03 13:07:34 +10:00
Andrew Tridgell
472b96d6d3 first stage of efficient non-blocking ctdb traverse
(This used to be ctdb commit 4c23e6f26bde421bb56b55de9d6cd3e319b2be40)
2007-05-03 12:16:03 +10:00