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

183 Commits

Author SHA1 Message Date
Andrew Tridgell
a919f6927a fixed return code
(This used to be ctdb commit 30165b5a19f9bd9d1f62c9c222df0711c1c6a927)
2007-09-13 10:02:56 +10:00
Andrew Tridgell
42168177ef merge from ronnie
(This used to be ctdb commit 1f21d4d563232926c35d03c4d69eb69190823dc6)
2007-09-10 13:21:11 +10:00
Andrew Tridgell
f3927719c9 add crontab and sysctl output
(This used to be ctdb commit b1b59f3294ee7a5ed6d685f373bf19d3152170fa)
2007-09-10 11:27:07 +10:00
Ronnie Sahlberg
d91b28f8b7 ctdb ip must loop over all connected nodes to pull hte public ip list
and merge into a big list   since with the deassociation between a node 
and a public ipaddress    the /etc/ctdb/public_addresses files can 
differ between nodes and no node know about all public addresses that a 
cluster can use

(This used to be ctdb commit e208294fed183977cacc44b2cd1195c11d967c18)
2007-09-07 16:45:19 +10:00
Ronnie Sahlberg
3cad21d6be remove the ctdb publicip command
this command no longer makes sense when there is no on-to-one mapping 
between a node and its default public ip

(This used to be ctdb commit 91280db7f6dd3d659edd86fae21ba347d6f9da9e)
2007-09-07 15:39:26 +10:00
Ronnie Sahlberg
68c37f9b41 merge from tridge
(This used to be ctdb commit 58c918b1bfe09c31049769dee266129cbad4cb20)
2007-09-07 09:21:40 +10:00
Andrew Tridgell
c572d3c226 added a diagnostics tool for ctdb
(This used to be ctdb commit 032a2238caf688656b00e06bf363182368e037e1)
2007-09-05 14:20:34 +10:00
Ronnie Sahlberg
157be530dd change ctdb_ctrl_getvnn to ctdb_ctrl_getpnn
(This used to be ctdb commit ef47cc4cd416065c69382e4d9e76c30a0a34e42f)
2007-09-04 10:38:48 +10:00
Ronnie Sahlberg
211b497818 change ctdb_node_flags_change.vnn to ctdb_node_flags_changed.pnn
change ctdb_ban_info.vnn to ctdb_ban_info.pnn

(This used to be ctdb commit fcedd40e0493948829e1c921d4fe30e9196e398a)
2007-09-04 10:33:10 +10:00
Ronnie Sahlberg
6f693bbcbd change server_id.vnn to server_id.pnn
(This used to be ctdb commit 26f2ee2b754a9271454412f05111a19b3013c6eb)
2007-09-04 10:21:51 +10:00
Ronnie Sahlberg
4ba9990143 change vnn to pnn in the ctdb tool
(This used to be ctdb commit 822556a4d4ba23459be3a25cbd3f48d1f64ba95f)
2007-09-04 10:14:41 +10:00
Ronnie Sahlberg
12ebb74838 change how we do public addresses and takeover so that we can have
multiple public addresses spread across multiple interfaces on each 
node.

this is a massive patch since we have previously made the assumtion that 
we only have one public address per node.

get rid of the public_interface argument.  the public addresses file 
now explicitely lists which interface the address belongs to

(This used to be ctdb commit 462ebbc791e906a6b874c862defea43235597ca8)
2007-09-04 09:50:07 +10:00
Ronnie Sahlberg
801bdbdc80 add a control to pull the server id list off a node
(This used to be ctdb commit 38aa759aa88a042c31b401551f6a713fb7bbe84e)
2007-08-26 10:57:02 +10:00
Ronnie Sahlberg
6681da31df add an initial implementation of a service_id structure and three
controls to  register/unregister/check a server id.

a server id consists of TYPE:VNN:ID    where type is specific to the 
application.  VNN is the node where the serverid was registered and ID 
might be a node unique identifier such as a pid or similar.


Clients can register a server id for themself at the local ctdb daemon.
When a client dissappears   or when the domain socket connection for the 
client drops  then any and all server ids registered across that domain 
socket will also be automatically removed from the store.

clients can register as many server_ids as they want at the same time    
but each TYPE:VNN:ID must be globally unique.

Clients have the option of explicitely unregister a server id by using 
the UNREGISTER control.


Registration and unregistration can only be done by clients to the local 
daemon. clients can not register their server id to a remote node.


clients can check if a server id does exist on any ctdb node in the 
network by using the check control

(This used to be ctdb commit d44798feec26147c5cc05922cb2186f0ef0307be)
2007-08-24 15:53:41 +10:00
Ronnie Sahlberg
f854b5f876 try out a slightly different api for controls where you provide a
callback function which is called upon completion (or timeout) of the 
control.

modify scanning of recmaster in the monitoring_cluster code to try the 
api out

(This used to be ctdb commit c37843f1d97b169afec910e7ddb4e5ac12c3015c)
2007-08-23 19:27:09 +10:00
Ronnie Sahlberg
8fd3df2553 hang the ctdb_req_control structure off the ctdb_client_control_state
struct  so that if we timeout a control we can print debug info such as 
what opcode failed and to which node

we dont need the *status parameter to ctdb_client_control_state

create async versions of the getrecmaster control

pass a memory context to getrecmaster

(This used to be ctdb commit 558b680c82f830fba82c283c78c2de8a0b150b75)
2007-08-23 13:00:10 +10:00
Ronnie Sahlberg
f6e0336b23 create a define to represent the 'invalid' generation id we used in two
places.

create a new helper function to generate new generation id values that 
know about the invalid id and avoids generating it.

update the ctdb status tool to know about the invalid generation id and 
print the string INVALID instead

(This used to be ctdb commit 4fbcd189543cb8a92227fdcd3d158472e558ccda)
2007-08-22 12:38:31 +10:00
Ronnie Sahlberg
26d3cd38a9 change fprintf(stderr to DEBUG(0, now that client DEBUGs are redirected
to stderr

(This used to be ctdb commit 14078130d295014a751f3e0039bc8eaf427440f9)
2007-08-08 10:19:42 +10:00
Andrew Tridgell
8a81a03b9e merge from ronnie
(This used to be ctdb commit e06f70f064e39f1a4a394f00b81b6b1d215534d4)
2007-08-07 13:40:13 +10:00
Ronnie Sahlberg
d69055b789 change error output in ctdb and in ctdb_cmdline_client to print to
stderr instead of stdout

(This used to be ctdb commit 6e6e165c2d8f0963ce37567c23aaa012fc3e89d9)
2007-08-07 12:51:25 +10:00
Ronnie Sahlberg
2b51871bad add a ctdb command to print the default public ip of a host.
(This used to be ctdb commit 7de5489f6ebd0e5671e7afa5cb51471043ee46d1)
2007-08-07 12:10:05 +10:00
Ronnie Sahlberg
fca90ce3c3 updated ctdb tickle management
there is an array for each node/public address that contains tcp tickles

we send a TCP_ADD as a broadcast to all nodes when a client is added

if tcp tickles are removed, they are only removed immediately from the 
local node.
once every 20 seconds a node will push/broadcast out the tickle list for 
all public addresses it manages.   this will remove any deleted tickles 
from the remote nodes

(This used to be ctdb commit e3c432a915222e1392d91835bc7a73a96ab61ac9)
2007-07-20 15:05:55 +10:00
Ronnie Sahlberg
a650497680 as an optimization for when we want to send multiple tickles at a time
let the caller create the sending socket and use a single socket instead 
of one new one for each tickle.
pass a sending socket to ctdb_sys_send_tcp()

ctdb_sys_kill_tcp is not longer used so remove it

set the socketflags for close on exec and nonblocking in the helper that 
creates the sockets instead of in the caller

add a helper to create a sending socket to send tickles from

(This used to be ctdb commit 469f3fb238a0674a2b48fdf1a7e657e32428178a)
2007-07-12 09:22:06 +10:00
Ronnie Sahlberg
76ab80104a make the ctdb tool use the killtcp control in the daemon instead of
calling killtcp directly

(This used to be ctdb commit d21e3e9cf11bdcba6234302e033d6549c557dd69)
2007-07-12 08:30:04 +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
Ronnie Sahlberg
d81bca2072 make it possible to specify how many times ctdb killtcp will try to RST
the tcp connection

change the 60.nfs script to run ctdb killtcp in the foreground so we 
dont get lots of these running in parallel when there are a lot of tcp 
connections to rst

(This used to be ctdb commit d81616214752882242f2886e94681972a790db80)
2007-07-10 10:24:20 +10:00
Andrew Tridgell
871ef93b82 fixed help layout
(This used to be ctdb commit ee8acf166961838a3a82d658a66407ba5ccb4939)
2007-07-05 10:00:51 +10:00
Andrew Tridgell
3b4fa64dd9 fixed error message on bad IP/port
(This used to be ctdb commit ad2d8615c028d55bc5e94c9d7bd8432cafde4a69)
2007-07-05 09:59:45 +10:00
Ronnie Sahlberg
71ba917444 add a command to ctdb to send tickle-ack's
(This used to be ctdb commit 83ddb6eaa269fbc5f235d606ee21239a7e0e23d2)
2007-07-05 08:56:02 +10:00
Andrew Tridgell
bdf01ed7c0 - neaten up the command line for killtcp
- split out the event script code into a separate module
- get rid of the separate takeover directory

(This used to be ctdb commit 8ea2c923a3e2464200ff79bf2c3f1f89e6a93ad4)
2007-07-04 16:51:13 +10:00
Ronnie Sahlberg
5ad7f642f3 we dont need socketkiller anymore now that the
kill-tcp-connection code is available from the ctdb tool

(This used to be ctdb commit c24890ad44b535c989bd21e83d619a1bd4825834)
2007-07-04 14:16:28 +10:00
Ronnie Sahlberg
ab6564c83d add a killtcp command to the ctdb tool
(This used to be ctdb commit 01987b51fed0dc0b9a5e254fa734bdeb19debf6f)
2007-07-04 14:14:48 +10:00
Ronnie Sahlberg
edcab7e068 ETH_P_IP does not work on my ubuntu system so changing it back to the
slightly less efficient ETH_P_ALL

(This used to be ctdb commit 84b8c77654b6c24928f63c801b183390824a3f6f)
2007-07-04 13:27:08 +10:00
Andrew Tridgell
2014d3959f merge from ronnie
(This used to be ctdb commit b5510446073d6a058d11dabf92bef0e9721cd861)
2007-07-04 13:14:45 +10:00
Ronnie Sahlberg
597aa7ed59 initial version of a socketkiller tool
checked in so it is not lost 

this tool takes a socketpair as arguments and will reset the tcp 
connection

(This used to be ctdb commit bddd448740ef7f5a88b8549a3d184a94ac9fcd96)
2007-07-04 12:52:07 +10:00
Andrew Tridgell
1ac8a52891 simpler handling of -n all in ctdb tool
(This used to be ctdb commit 68c7c33c2863d4073e5129b24eb79454643dc65f)
2007-06-11 22:25:26 +10:00
Ronnie Sahlberg
6613396ad5 update the blurb for the setmonmode control it takes 0 or 1 as a
parameter depending on whether one wants to disabel or enable monitoring

(This used to be ctdb commit 849a1cce6cc3e145925dd4a8a38b2698be0ce8d5)
2007-06-09 07:54:37 +10:00
Andrew Tridgell
06a71762a4 some #include cleanups
(This used to be ctdb commit 1a07d87122d51a40cd8ad5fe13533298c26857cb)
2007-06-07 22:26:27 +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
96861466b7 there are now far too many controls for the controls statistics fields to be useful
(This used to be ctdb commit f5e188fc7e13b55b6b4081dcc74ea9614a76f9bb)
2007-06-07 18:07:38 +10:00
Andrew Tridgell
cb4c33cc68 handle CTDB_CURRENT_NODE in ban commands
(This used to be ctdb commit fefb53f1d22c5458a1e107f8352818aee87983de)
2007-06-07 16:48:31 +10:00
Andrew Tridgell
23bf62fe30 added admin commands to ban/unban nodes
(This used to be ctdb commit 4dad04172e7e4955b5bf6444a85b19901c9683ad)
2007-06-07 16:34:33 +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
9754d16d48 merged admin enable/disable change from ronnie
(This used to be ctdb commit df17b69dfd83a98f9c711994c7dd51ad2cc0ab8a)
2007-06-07 11:15:22 +10:00
Ronnie Sahlberg
d93c6f8db2 show the disabled/permanently disabled status in the machinereadble
output for 'ctdb status'

(This used to be ctdb commit a9e920a492e1e91d205ee8b9cd704a7cf85c1e01)
2007-06-07 09:27:51 +10:00
Ronnie Sahlberg
9ff733c784 add a control to permanently enable/disable a node
(This used to be ctdb commit d66fdba16ca22f62ddac6882a17614879b08a798)
2007-06-07 09:16:17 +10:00
Andrew Tridgell
341d715f1a formatting fix for wider variable names
(This used to be ctdb commit 195bde145f62221a7bb1b12014ada98ad5df4e9e)
2007-06-06 22:17:46 +10:00
Andrew Tridgell
b130540102 merged vsftpd event script from ronnie
(This used to be ctdb commit c0b686c43524c6a93c52d85b0079ed820983133e)
2007-06-06 10:29:27 +10:00
Andrew Tridgell
af8834dd02 added health monitoring logic to ctdb, so a node loses its public IP address if one of the sybsystem event scripts reports a problem
(This used to be ctdb commit c7a089256d86cec21097453bce5acbccee87413f)
2007-06-06 10:25:46 +10:00
Ronnie Sahlberg
91a97fea03 provide machinereadable output for ctdb ip
(This used to be ctdb commit 86348de0bfdc4f91ff6f5a8eeff06044d512ee43)
2007-06-05 18:32:06 +10:00