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

81 Commits

Author SHA1 Message Date
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
7cd7081beb support ctdb status -n all
(This used to be ctdb commit 8ff2ea29fc60a1e9854bf0c59c360e29f35d3b69)
2007-05-30 11:12:50 +10:00
Andrew Tridgell
578b2a585d - make more options configurable
- fixed some warnings

(This used to be ctdb commit e08bb371827b14a80a131ce8e83145cd468e7e1f)
2007-05-29 16:02:02 +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
922d054bca remove experimental code
(This used to be ctdb commit f1d91002247bedb2f163cc9a9515bbe2bbc2692e)
2007-05-27 16:58:43 +10:00
Andrew Tridgell
957ec5d63a fixed tcp data offset and checksum
(This used to be ctdb commit 2df23e0d3df52b746e9aee8d194ad1da16b62657)
2007-05-27 16:56:12 +10:00
Andrew Tridgell
56e3eed3d1 added IP takeover logic for public IPs to ctdb
(This used to be ctdb commit 374adb729472670f35cef41269b8719f49c0de0e)
2007-05-25 17:04:13 +10:00
Ronnie Sahlberg
2b6c39a0af add controls to take over and release an ip address
add sending of grat arp     both normal grat arp (request) and also
unsolicited grat arp replies

(This used to be ctdb commit 7305c00c21c30bdbafc3722a018513378bd307e6)
2007-05-25 13:05:25 +10:00
Ronnie Sahlberg
2aface246e add a new command for ctdb_control to trigger a recovery
(This used to be ctdb commit 6da2a4ab1b9c955d55a1c6817506a74539623892)
2007-05-24 08:08:45 +10:00
Andrew Tridgell
296e15c9d4 fixed some memory leaks on the traverse code
(This used to be ctdb commit 2781cbb7d00c5448449216c8c0c1b37bdc74a6c0)
2007-05-23 20:06:37 +10:00
Ronnie Sahlberg
e989a1bac8 add controls to enable/disable the monitoring of dead nodes
(This used to be ctdb commit 79d29c39bb81feb069db3fc6d3d392c1e75a4d13)
2007-05-21 09:24:34 +10:00
Ronnie Sahlberg
db4c479568 add dead node detection so that if a node does not generate any
keepalive traffic for x seconds   it is deemed dead


this triggers a recovery after a while if a ctdbd has been STOPPED    
but it doesnt recover automatically when the node reappears

(This used to be ctdb commit d6324afe0d13b5e21d06e347caca433c6b36a32a)
2007-05-18 19:19:35 +10:00
Ronnie Sahlberg
f4738f9c41 we no longer pass lmaster across during pulldb so dont print it from
catdb either

(This used to be ctdb commit b57d60f4789ea7f0dd69c93f6629d8742e182576)
2007-05-17 12:07:29 +10:00
Ronnie Sahlberg
cc760cf13a add a control to shutdown/kill a node
(This used to be ctdb commit 3802f7304fd59d56062c855987e2561753e85a69)
2007-05-17 10:45:31 +10:00
Andrew Tridgell
81826da2df added error messages in ctdb_control replies
(This used to be ctdb commit bd848f5b760e6b2a73ebfc67fd8adb3c31479fb5)
2007-05-12 21:25:26 +10:00
Andrew Tridgell
5bd0e50086 added -t option to ctdb_control
(This used to be ctdb commit 658141280eeb121a570d71c4b0af36d03004f320)
2007-05-12 16:04:56 +10:00
Andrew Tridgell
2c90d9e794 show total frozen/recoving in status
(This used to be ctdb commit 0d0eb66a63fe6912edb85bf7387ac76acb70babd)
2007-05-12 15:51:08 +10:00
Andrew Tridgell
b327cd872d report number of frozen/thawed nodes
(This used to be ctdb commit 997720bc0e15d882aefed3464fe285674beed691)
2007-05-12 15:44:56 +10:00
Andrew Tridgell
9cf77dd23f separate out the freeze/thaw handling from recovery
(This used to be ctdb commit 0b0640bd8b8334961f240e0cf276ac112cd6e616)
2007-05-12 15:15:27 +10:00
Andrew Tridgell
f8765b19bf - got rid of the complex hand marshalling in the recovery controls
- fixed the re-send of ctdb calls after a generation change

- fixed a reqid idr leak in controls

- removed the write_record test code

- use the new nonblock lockall code to prevent ctdbd from ever doing a
  blocking lock that could deadlock with smbd

- moved more of the recovery controls into ctdb_recover.c

(This used to be ctdb commit 565a21aa4f1e842309986ab97d6244801153deec)
2007-05-10 17:43:45 +10:00
Andrew Tridgell
15bc97cdaa better timeout handling for calls, controls and traverses
(This used to be ctdb commit 63346a6c59d4821b4c443939b5d88db8cd20f5fe)
2007-05-10 14:06:48 +10:00
Andrew Tridgell
31cd92dc7e merge from ronnie
(This used to be ctdb commit 92b7a849565730744c75a7fb776173554e9f57bf)
2007-05-10 13:15:58 +10:00
Ronnie Sahlberg
82e37a9886 update ctdb_control to create a correct ctdb_vnn_map->map array
(This used to be ctdb commit e510cc89068557881688d6cada38915b3e51f8cd)
2007-05-10 10:03:21 +10:00
Andrew Tridgell
1e38ae491f remove old s3 recovery code
fixed vnnmap wire format in recover daemon

(This used to be ctdb commit e03fab7bfe0cf43f40c49a3d63e75dc44001d8d8)
2007-05-10 08:49:57 +10:00
Ronnie Sahlberg
39d81cffb1 recovery daemon with recovery master election
election is primitive, it elects the lowest vnn as the recovery master

two new controls, to get/set recovery master for a node



to use recovery daemon,   start one  
./bin/recoverd --socket=ctdb.socket*
for each ctdb daemon


it has been briefly tested by deleting and adding nodes to a 4 node 
cluster but needs more testing

(This used to be ctdb commit 541d1cc49d46d44042a31a8404d521412ef2fdb3)
2007-05-07 06:51:58 +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
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
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
Ronnie Sahlberg
508cafd17e merge from tridge
(This used to be ctdb commit 6c8b90cedc67daa89d54db5268fde18bfc20abaf)
2007-05-04 17:05:28 +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
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
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
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
Andrew Tridgell
486c6b4fce merged from ronnie
(This used to be ctdb commit 57a80110ddfd202f8de37297db76dc43a064e476)
2007-05-03 13:53:54 +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
Ronnie Sahlberg
27880056db break set/get vnn map out from ctdb_control and put it in ctdb_recover.c
for the time being

remove all the [de]marshalling and just pass a structure around instead

(This used to be ctdb commit b1169555ab7015976c0135ff51121cc238f5887c)
2007-05-03 11:06:24 +10:00
Ronnie Sahlberg
768eb0f763 merge from tridge
(This used to be ctdb commit 17b73a811009588f836c3f9fd1b775d9d504d30c)
2007-05-02 22:00:48 +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
Andrew Tridgell
317ad52758 added a builtin fetch function to support samba3 unlocked fetch
(This used to be ctdb commit 8c57a8355a94a7d714b9bec98533bc40a2bc4684)
2007-05-02 15:11:11 +10:00
Andrew Tridgell
2767ebb8df nicer command parsing in ctdb_control
(This used to be ctdb commit 440077ffabb4ce831004b36ac26bd2f8f9b41499)
2007-05-02 13:34:55 +10:00