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

76 Commits

Author SHA1 Message Date
Ronnie Sahlberg
ceaf488f05 do persistent writes in a child process
(This used to be ctdb commit 2da3d1f876f5d654f849af8a3e588f5a61300c3d)
2008-05-28 13:04:25 +10:00
Ronnie Sahlberg
9da30f488d add "machinereadable output" support to "ctdb getmonmode"
(This used to be ctdb commit 9aa09aee618fa71787c5d0e7c885e83f4d82236c)
2008-05-16 09:21:44 +10:00
Ronnie Sahlberg
909ff219e0 Start implementing support for ipv6.
This enhances the framework for sending tcp tickles to be able to send ipv6 tickles as well.

Since we can not use one single RAW socket to send both handcrafted ipv4 and ipv6 packets, instead of always opening TWO sockets, one ipv4 and one ipv6 we get rid of the helper ctdb_sys_open_sending_socket() and just open (and close)  a raw socket of the appropriate type inside ctdb_sys_send_tcp().
We know which type of socket v4/v6 to use based on the sin_family of the destination address.

Since ctdb_sys_send_tcp() opens its own socket  we no longer nede to pass a socket
descriptor as a parameter.  Get rid of this redundant parameter and fixup all callers.

(This used to be ctdb commit 406a2a1e364cf71eb15e5aeec3b87c62f825da92)
2008-05-14 15:47:47 +10:00
Ronnie Sahlberg
123d0b3b1e fix merge corruption
(This used to be ctdb commit 17b1e3b2d72c453a0b2f5a783c28f9dd17334620)
2008-05-08 19:52:27 +10:00
Andrew Tridgell
e8a62cdca4 Merge branch 'master' of git://git.samba.org/sahlberg/ctdb
(This used to be ctdb commit cb2c05d5d3f8908eecdad1ae6a1dc8efa1ffcb1e)
2008-05-08 16:58:34 +10:00
Ronnie Sahlberg
92b61cd7d5 Expand the client async framework so that it can take a callback function.
This allows us to use the async framework also for controls that return
outdata.

Add a "capabilities" field to the ctdb_node structure. This field is
only initialized and kept valid inside the recovery daemon context and not
inside the main ctdb daemon.

change the GET_CAPABILITIES control to return the capabilities in outdata instead of in the res return variable.

When performing a recovery inside the recovery daemon, read the capabilities from all connected nodes and update the ctdb->nodes list of nodes.
when building the new vnnmap after the database rebuild in recovery, do not include any nodes which lack the LMASTER capability in the new vnnmap.
Unless there are no available connected node that sports the LMASTER capability in which case we let the local node (recmaster) take on the lmaster role temporarily (i.e. become a member of the vnnmap list)

(This used to be ctdb commit 0f1883c69c689b28b0c04148774840b2c4081df6)
2008-05-06 15:42:59 +10:00
Ronnie Sahlberg
a9c45f9513 Add a capabilities field to the ctdb structure
Define two capabilities :
can be recmaster
can be lmaster
Default both capabilities to YES

Update the ctdb tool to read capabilities off a node

(This used to be ctdb commit 50f1255ea9ed15bb8fa11cf838b29afa77e857fd)
2008-05-06 10:02:27 +10:00
Ronnie Sahlberg
6fd1c60741 when deleting a public ip from a node that is currently hosting this ip, try to move the ip address to a different node first
(This used to be ctdb commit 9395a05de669c69396e701fb36409ec49d3ebef6)
2008-04-24 21:51:08 +10:00
Ronnie Sahlberg
60583c70bc when adding a new public ip address to a running node using the 'ctdb addip' command,
If no other node is hosting this public ip at the moment, then assign it immediately to the current node.

(This used to be ctdb commit a63825e32658b36e0964584758b9a276c18056b8)
2008-04-23 21:05:36 +10:00
Ronnie Sahlberg
b1b8aeb414 make ctdb eventrscipt accept the -n all argument to run the event script on all connected nodes
(This used to be ctdb commit 772052e071718f20a19d24d5e06a5a2ef87549f2)
2008-04-22 22:23:57 +02:00
Ronnie Sahlberg
bb237ab5ec add support for -n all in "ctdb -n all ip"
this collects all public addresses from all nodes and presents the public ips
for the entire cluster

(This used to be ctdb commit cbf79b2158ab21a58aef967e89f0bd60890a7972)
2008-04-22 22:18:54 +02:00
Ronnie Sahlberg
a6cbe34c62 add support for -n all in "ctdb -n all ip"
this collects all public addresses from all nodes and presents the public ips
for the entire cluster

(This used to be ctdb commit 0a4e667f42c6fb23be13651f7b0d0a545a49900b)
2008-04-23 00:55:57 +10:00
Ronnie Sahlberg
f153a45e56 make ctdb eventrscipt accept the -n all argument to run the event script on all connected nodes
(This used to be ctdb commit 3fad7d67f2c66ac3a65cfd821fd6db6342f4a3f0)
2008-04-15 18:24:48 +10:00
Ronnie Sahlberg
416409d31b add a ctdb command to print the ctdb version
(This used to be ctdb commit 401fb01f8cb06886e2c5c277a9a70512a9b68579)
2008-04-03 17:07:00 +11:00
Ronnie Sahlberg
d6736b3720 we allocated one byte too little in the blob we need to send as the control to the server.
(This used to be ctdb commit 10e585413c217d9b9c32ff3d2fb3d8f24183c458)
2008-04-03 16:35:23 +11:00
Ronnie Sahlberg
e8e67ef576 add a mechanism to force a node to run the eventscripts with arbitrary arguments
ctdb eventscript "command argument argument ..."

(This used to be ctdb commit 118a16e763d8332c6ce4d8b8e194775fb874c8c8)
2008-04-02 11:13:30 +11:00
Ronnie Sahlberg
27a7f854f5 add improvements to tracking memory usage in ctdbd adn the recovery daemon
and a ctdb command to pull the talloc memory map from a recovery daemon
ctdb rddumpmemory

(This used to be ctdb commit d23950be7406cf288f48b660c0f57a9b8d7bdd05)
2008-04-01 15:34:54 +11:00
Ronnie Sahlberg
a1334246cf make sure the iface string is nullterminated in the addip control packet
(This used to be ctdb commit 983490556bc12fe03de4c22b5fdc12d15c11d43c)
2008-03-31 12:49:39 +11:00
Ronnie Sahlberg
0d7b34c9e5 Add two new controls to add/delete public ip address from a node at runtime.
The controls only modify the runtime setting of which public addresses a node
can server and does not modify /etc/ctdb/public_addresses.
To make the change permanent you also need to edit /etc/ctdb/public_addresses
manually.

After ip addresses have been added/deleted you need to invoke a recovery
for the ip addresses to be redistributed.

(This used to be ctdb commit f8294d103fdd8a720d0b0c337d3973c7fdf76b5c)
2008-03-27 09:23:27 +11:00
Ronnie Sahlberg
2863d2cfd1 From M Dietz,
Add back the controls to enable/disable monitoring we used to have for debugging but removed a while ago

(This used to be ctdb commit 8477f6a079e2beb8c09c19702733c4e17f5032fe)
2008-03-25 08:27:38 +11:00
Ronnie Sahlberg
b1cf2b5653 Update ctdb uptime to provide machinereadable output
(This used to be ctdb commit 4f7f8aa6f178115b551ac35f7df2ec5aad054fe2)
2008-03-04 13:29:48 +11:00
Ronnie Sahlberg
61b52e0e64 provide machinereadble -Y output for 'ctdb getdebug'
(This used to be ctdb commit 646f4d9a01637685e967fb3ecc042fc97c0b7529)
2008-03-04 13:23:06 +11:00
Ronnie Sahlberg
212fbb42d5 make 'ctdb ip' provide machinereadble output using '-Y'
(This used to be ctdb commit 446e2f4e650b12d6fce5677a6841006462c23dba)
2008-03-04 13:18:27 +11:00
Ronnie Sahlberg
d9b534b59d A new command to 'ctdb'
ctdb moveip <IPADDRESS> <NODE>

which can be used to manually fail an ip address over to a specific node.

This can only be used if DeteministicIPs are disabled and also only if NoIPFailback is enabled.

(This used to be ctdb commit ffee062b7e26a6aa6ad254edb58399040ecaa542)
2008-03-04 12:20:23 +11:00
Ronnie Sahlberg
e0036942bc add a new file <reclock>.pnn where each recovery daemon can lock that byte at offset==pnn to offer an alternative way to detect which nodes are active instead of relying on CONNECTED being accurate.
(This used to be ctdb commit 21d3319eaf463e2a00637d440ee2d4d15f53bf09)
2008-02-29 12:37:42 +11:00
Ronnie Sahlberg
4adeafef11 add a control to get the name of the reclock file from the daemon
(This used to be ctdb commit 9effb22cc1616d684352d7ebabb359e69adb0f52)
2008-02-29 10:03:39 +11:00
Ronnie Sahlberg
16c4e9c4aa make the ctdb reloadnodes reload the nodes file on all nodes and restart the transport
(This used to be ctdb commit 6272ad33b4af6ea9d6fd0ac877df3f75be45d665)
2008-02-21 08:25:01 +11:00
Ronnie Sahlberg
9f99b44fd1 to make it easier/less disruptive to add nodes to a running cluster
add a new control that causes the node to drop the current nodes list
and reread it from the nodes file.
During this operation, the node will also drop the tcp layer and restart it.

When we drop the tcp layer, by talloc_free()ing the ctcp structure
add a destructor to ctcp so that we also can clean up and remove the references in the ctdb structure to the transport layer

add two new commands for the ctdb tool.
one to list all nodes in the nodesfile and the second a command to trigger a node to drop the transport and reinitialize it with the nde nodes file

(This used to be ctdb commit 4bc20ac73e9fa94ffd43cccb6eeb438eeff9963c)
2008-02-19 14:44:48 +11:00
Andrew Tridgell
275cd68867 nicer use of structures and use isalpha()
(This used to be ctdb commit 19b5fbcd16596a4b6c22056585dd4bd988db3db7)
2008-02-05 10:36:06 +11:00
Ronnie Sahlberg
3f56526037 Specify and print debuglevels by name and not by number
(This used to be ctdb commit 79ad830294b8b677fbd0c5ad7ed6fbde71f74f8d)
2008-02-05 10:26:23 +11:00
Andrew Tridgell
f6e53f433b merge from ronnie
(This used to be ctdb commit e7b57d38cf7255be823a223cf15b7526285b4f1c)
2008-02-04 20:07:15 +11:00
Andrew Tridgell
3777346629 partial merge from ronnie
(This used to be ctdb commit fd316deb8a9e0545c8efa1bfc8ad83962b310405)
2008-01-29 11:39:06 +11:00
Andrew Tridgell
eb044bb1d6 make ctdb dumpmemory work remotely, and dump the talloc
memory tree to stdout. This is much more useful than putting it in the log, and also fixes
a bug where the pipe would overflow internally and cause ctdbd to lockup

(This used to be ctdb commit e236979e2162d9bd7a495086342168a696cf76c5)
2008-01-22 14:22:41 +11:00
Ronnie Sahlberg
9055978b46 add a ctdb uptime command that prints when ctdb was started and when the
last recovery occured

(This used to be ctdb commit b86e8ccbdac044bb949c4fc2ebb27635126272a9)
2008-01-17 11:33:23 +11:00
Andrew Tridgell
2119f0a66c add a max runtime switch to ctdb tool
(This used to be ctdb commit b681e4f2011481aebbe18fd0147c2d500caf2705)
2008-01-10 08:04:54 +11:00
Andrew Tridgell
673a2b46f9 nicer outut from repack and vacuum
(This used to be ctdb commit 446c76bc332fe1366c32898fb77279a902d7159c)
2008-01-08 23:02:43 +11:00
Andrew Tridgell
96100fcae6 added two new ctdb commands:
ctdb vacuum   : vacuums all the databases, deleting any zero length
                 ctdb records

 ctdb repack   : repacks all the databases, resulting in a perfectly
                 packed database with no freelist entries

(This used to be ctdb commit 3532119c84ab3247051ed6ba21ba3243ae2f6bf4)
2008-01-08 17:23:27 +11:00
Ronnie Sahlberg
7cef33b40a rework banning/unbanning nodes
ctdb_recoverd.c
Always handle banning/unbanning locally on the node that is being 
banned/unbanned instead of on the recovery master.
This means that if a ban request comes in to the recovery master for a 
remote node, we pass the request on to the remote node instead of 
setting up the ban and ban timeouts locally.

ctdb.c
send ban/unban requests to the node being banned/unbanned instead of to 
the recmaster

(This used to be ctdb commit 880dd9f5fd0b91e450da93e195cc5c62cb1dcd6e)
2007-12-03 15:45:53 +11:00
Ronnie Sahlberg
0eb6c04dc1 get rid of the control to set the monitoring mode.
monitoring should always be enabled
(though a node may want to temporarily disable running the "monitor"
event scripts but can do so internally without the need for this 
control)

(This used to be ctdb commit e3a33618026823e6af845fd8513cddb08e6b5584)
2007-11-30 10:00:04 +11:00
Ronnie Sahlberg
9a93f4b8df reverse the order in which public ips are listed so it matches the order
of the public_addresses file

(This used to be ctdb commit ce987661edd9160982e65866fb773445d296e5c7)
2007-10-17 13:42:42 +10:00
Ronnie Sahlberg
80cd82f8e4 add a control to send gratious arps from the ctdb daemon
(This used to be ctdb commit 563819dd1acb344f95aabb4bad990b36f7ea4520)
2007-10-09 11:56:09 +10:00
Ronnie Sahlberg
ab5d098bf6 add a function in the ctdb tool to determine whether the local node is
the recmaster or not.

return 0 if the node is the recmaster and 1 (true) if it is not or if 
we could not communicate with the ctdb daemon.


call it 'isnotrecmaster' to cope with that if the tool could not bind to 
the socket to tyalk to the daemon, the tool will automatically return an 
error and exit code 1
thus the tool will only return 0 if it could talk successfully to the 
local daemon and if the local daemon confirms this node is the recmaster

(This used to be ctdb commit ae5fcb790b6c3985f514fa8a96bc00c2619f2a28)
2007-10-08 09:47:20 +10:00
Andrew Tridgell
c60988325d added support for persistent databases in ctdbd
(This used to be ctdb commit 3115090a0d882beca9d70761130b74bb0821f201)
2007-09-21 12:24:02 +10:00
Andrew Tridgell
ed75f988d5 merge from ronnie
(This used to be ctdb commit 913c33a7d2f67570548fecc568dba874e5f72dd2)
2007-09-14 15:23:23 +10:00
Ronnie Sahlberg
2d0261afeb let ctdb ip only print the ip addresses known to the specified node
and not the entire cluster

(This used to be ctdb commit eb1f67a56d752c9f42a9a26a6697a7ab8e668b3a)
2007-09-14 15:19:44 +10:00
Andrew Tridgell
a919f6927a fixed return code
(This used to be ctdb commit 30165b5a19f9bd9d1f62c9c222df0711c1c6a927)
2007-09-13 10:02:56 +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
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