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

243 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
74d57f8d51 Redo the vacukming process to mkake it scalable.
Vacumming used to delete one record at a time on all nodes, that was
m*n behaviour and would require a huge storm of ctdb->ctdb controls and just wouldnt scale at all.

The new vacuming process collects all records to be deleted locally and then only sends 1 control to the other nodes. This control contains a list of all records to be deleted.

(This used to be ctdb commit 9e625ece19a91f362c9539fa73b6b2108f0d9c53)
2008-03-13 07:53:29 +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
146d4b0db7 merge async recovery changes from Ronnie
(This used to be ctdb commit 576e317640d25f8059114f15c6f1ebcee5e5b6e2)
2008-01-29 13:59:28 +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
Ronnie Sahlberg
5b7838d768 ctdb_control_send() does not need to take an outdata parameter
remove the outdata parameter from the function and all callers

(This used to be ctdb commit e3951337f8df2ae19cce61c954036590c7a03582)
2008-01-16 10:23:26 +11:00
Andrew Tridgell
3b3fceacbe block alarm signals during critical sections of vacuum
(This used to be ctdb commit cfb14ae76f00f10d27b56c034b2247ab12d63065)
2008-01-10 09:43:14 +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
5d9913642f allow remote variable expansion in onnode, so you can use wildcards that expand on the remote nodes
(This used to be ctdb commit def643225a1cb31d4999f3e73fad368ae60048ad)
2008-01-09 15:04:56 +11:00
Andrew Tridgell
bb3f77d61d changed default vacuum limit
(This used to be ctdb commit 7ca2977c12cf7938da639a17a0f857d7029d749c)
2008-01-09 08:28:18 +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
0ee375ad66 this is not an error - it just means the record was busy
(This used to be ctdb commit 749451a4e97330d0fc35f5366dcc61aa500f7ce9)
2008-01-08 22:36:44 +11:00
Andrew Tridgell
1c91398aef ensure the recovery daemon is not clagged up by vacuum calls
(This used to be ctdb commit ff7e80e247bf5a86adda0ef850d901478449675b)
2008-01-08 21:28:42 +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
Andrew Tridgell
d38fbaa38b nicer onnode output
(This used to be ctdb commit ac5c1e090d007bc2e3965589731620b87c0217fb)
2008-01-07 14:31:13 +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
Andrew Tridgell
684282f7a1 added bonding info to ctdb_diagnostics
(This used to be ctdb commit 71b5fc434bc5d88eb0669ee29aa932ba12737e07)
2007-10-30 10:18:52 +11:00
Andrew Tridgell
6e6de1e4b7 fixed a problem with backgrounding onnnode
(This used to be ctdb commit 4e23630224bb219cfbbf129c4562da5a4c2d601a)
2007-10-22 21:11:02 +10:00