summaryrefslogtreecommitdiffstats
path: root/ctdb/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* tools/ctdb: Do not use function return value as pnnAmitay Isaacs2012-11-141-3/+5
| | | | | | | | | This fixes the wrong code where same variable 'ret' is used to track the pnn and the return value of a function call. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 718233c445cd6627ab3962b6565c2655f1f8efd0)
* tool/ctdb: Always support ctdb version command, don't make it optionalAmitay Isaacs2012-10-301-8/+3
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit f8af7d8de76e68e5c4bde15f832a31ce9107e8c7)
* tools/ctdb: Merge recoverd log handling into getlog/clearlogMartin Schwenke2012-10-221-102/+63
| | | | | | | | | | We don't need extra commands for these. Also, allow a default value of NOTICE for the getlog level. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 7197e600f46f2d1638f6c45c0149f109ea25a47c)
* tools/ctdb: Add log ringbuffer handling for recoverdMartin Schwenke2012-10-221-0/+73
| | | | | | | | | | | This adds commands rdgetlog and rdclearlog These are analogous to getlog and clearlog but operate on the logs for the recovery daemon. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ef55e06192819d840c09b65741bab737223ac34c)
* ctdbd: Replace lockwait with locking API and remove ctdb_lockwait.cAmitay Isaacs2012-10-201-10/+0
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 2126795153dacb255e441abcb36ee05107b6282a)
* tools/ctdb: Display the locking statisticsAmitay Isaacs2012-10-201-14/+44
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit e24b5bf283736624b387b0364d7200212bb3054b)
* tools/ctdb_diagnostics: Add "ctdb listvars" outputMartin Schwenke2012-10-181-0/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2d75a04ba9a2e87a0dcb9bf778c58e335af1871c)
* tools/ctdb: Remove extra header from natgwlist -Y outputMartin Schwenke2012-10-181-4/+0
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 59520c9785d113ad5063eb5fbe42a9efc7e30076)
* tools/ctdb: Free the event contextMartin Schwenke2012-10-021-0/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit dc2a8c638bd74b9f1dd75339cd2ae2f32ffa18a8)
* tools/ctdb: Clean up control_natgw()Martin Schwenke2012-09-281-63/+69
| | | | | | | | | | * Factor out repeated code into new function find_natgw() * Support both machine and human readable output * Use libctdb Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a56ec75edd1705b0539513d396d311f0e80a3bf5)
* tools/ctdb: Convert some commands over to libctdbMartin Schwenke2012-09-281-19/+24
| | | | | | | | | control_getcapabilities(), control_lvs(), control_lvsmaster() updated to use ctdb_getcapabilities(), ctdb_getnodemap() as appropriate. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c30ec02615183ecf9b412ad415bf1abd859aec45)
* tools/ctdb: Remove redundant filtering loop in control_natgwlist()Martin Schwenke2012-09-281-3/+0
| | | | | | | | | This used to catch trailing blank lines. However, these are caught just as effectively by the whitespace filtering in the loop below. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 7b75a3bb722dc86139b1a07a0100d08c34620b91)
* tools/ctdb: natgwlist output is either human readable or machine readableMartin Schwenke2012-09-281-12/+28
| | | | | | | | | The first line is currently human readable and the rest is machine readable. This doesn't make sense. Do one or the other... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b29d5bbaa7048291c4b3a39bf12e04f0436f67da)
* tools/ctdb: Factor out printing of the machine readable status headerMartin Schwenke2012-09-281-4/+8
| | | | | | | | It is already in 2 places and we might use it in another. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 12a0a7a208d1c8fa8991894200d1dc133f3a2d1a)
* tools/ctdb: NAT gateway code should use CTDB_NATGW_NODESMartin Schwenke2012-09-281-1/+1
| | | | | | | | ... not NATGW_NODES. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2da7730dc06153173778ab14e228960e72ff8a86)
* ctdb tool: recmaster command might as well be auto-allMartin Schwenke2012-07-301-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 076282622fcb2663d378e0c90ed0d9c19f73c005)
* tools/onnode: Add -P option to push files to given nodesMartin Schwenke2012-07-301-13/+36
| | | | | | | | | | | | | | A list of files is given rather than a command. These files are pushed to the specified nodes. Quoting is fragile/broken so filenames with spaces won't work - you win some, you lose some. :-) All of the other onnode options should work together with this option. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit aed9b98ddbbf3e81de4f7257a10676565f7d7507)
* Remove tevent_loop_allow_nesting()Amitay Isaacs2012-07-161-1/+0
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 538c68d0e83e14f0000981ee06408b8f0035be37)
* ctdb: use correct "persistent" state for ctdb_attach in "ctdb cattdb"Michael Adam2012-07-031-1/+1
| | | | | | | | | Originally, "ctdb cattdb" attached explicitly as non-persistent, which is now forbidden for persistent databases by the server. Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> (This used to be ctdb commit 85a367005bd669309bb7e532b60d27621110180d)
* Add new command to find which interface is located onRonnie Sahlberg2012-06-201-0/+22
| | | | (This used to be ctdb commit f07376309e70f5ccdb7de8453caacc71b451ab48)
* STATISTICS: Add tracking of the 10 hottest keys per database measured in ↵Ronnie Sahlberg2012-06-131-0/+9
| | | | | | | | hopcount and add mechanisms to dump it using the ctdb dbstatistics command (This used to be ctdb commit 8307c70ed98996b430c470e9641a09fdeeb81bd8)
* Add new control to reload the public ip address file on a nodeRonnie Sahlberg2012-05-011-0/+91
| | | | | | | Also add a method to use the recovery master/daemon to reload the public ips on all nodes in the cluster. Reloading the public ips on all node sin the cluster is only suported if all nodes in the cluster are available and healthy. (This used to be ctdb commit 05603e914f8c12618d7e06943c0f7df207f645b0)
* Remove explicit include of lib/tevent/tevent.h.Amitay Isaacs2012-04-132-2/+0
| | | | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 0681014ca5ed2a9b56f63fdace7f894beccf8a9a)
* CTDB: add back the "rebalanceip" commandRonnie Sahlberg2012-04-031-0/+75
| | | | (This used to be ctdb commit 83aea6488002aa75dd25752fa0d164afb8b4f300)
* STICKY: add prototype code to make records stick to a node to "calm" down if ↵Ronnie Sahlberg2012-03-201-6/+68
| | | | | | | | they are found to be very hot and accessed by a lot of clients. This can improve performance and stop clients from having to chase a rapidly migrating/bouncing record (This used to be ctdb commit d0d98f7e45e5084b81335b004d50bddc80cdc219)
* STATISTICS: add per-db hop count statisticsRonnie Sahlberg2012-03-201-1/+6
| | | | (This used to be ctdb commit 1c976d83b1d7dac6f0ef81306774998e4c8b56a1)
* CTDB: change how the hop count buckets are displayed in ctdb statisticsRonnie Sahlberg2012-03-201-1/+1
| | | | (This used to be ctdb commit 05923a14bc8ae8e3c5cda28ff4e0fb0d473d5f7d)
* add max hop count buckets to see how bad hopcounts areRonnie Sahlberg2012-03-201-0/+6
| | | | (This used to be ctdb commit 7d3931298e6477d92f43652c3006b0c426cb1307)
* Merge remote branch 'martins/master'Ronnie Sahlberg2012-03-151-1/+1
|\ | | | | | | (This used to be ctdb commit af72f8bc05f78983f9624d81788f9d89af474b11)
| * ctdb tool: fix thinko in nodestatus command outputMartin Schwenke2012-02-131-1/+1
| | | | | | | | | | | | | | | | If used with -n <nodes> the "current" node needs to change. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a0340a50c2acd9ccc281faef032a364254f7f95a)
* | When adding ips to nodes, set up a deferred rebalance for the whole node to ↵Ronnie Sahlberg2012-02-281-11/+41
| | | | | | | | | | | | trigger after 60 seconds in case the normal ipreallocated is not sufficient to trigger rebalance. (This used to be ctdb commit 4340263b219d75c39f8de22abe3f6f1c1ee63ea2)
* | FreeBSD does not define s6_addr32, only s6_addrVolker Lendecke2012-02-131-5/+7
| | | | | | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> (This used to be ctdb commit d657af4fb68ce3f7c462856f2934f6bf169e120b)
* | READONLY: allow specifying the db name for setdbreadonly instead of just ↵Ronnie Sahlberg2012-02-131-2/+31
|/ | | | | | the hash (This used to be ctdb commit 3c2117e8e4156e0048fbd2c94546112f0c588522)
* ReadOnly: add per-database statistics to view how much delegations/revokes ↵Ronnie Sahlberg2012-02-081-0/+50
| | | | | | we have (This used to be ctdb commit 751ed46197661eb841042ab6a02855a51dd0b17c)
* STATISTICS: add total counts for number of delegations and number of revokesRonnie Sahlberg2012-02-081-0/+2
| | | | | | | | | Everytime we give a delegation to another node we count this as one delegation. If the same record is delegated to several nodes we count one for each node. Everytime a record has all its delegations revoked we count this as one revoke. (This used to be ctdb commit b098bcf8007be63889aaed640a951b0eeaa9d191)
* Ad test tool to store data and ctdb header into a local tdb fileRonnie Sahlberg2012-02-071-1/+64
| | | | (This used to be ctdb commit c6433e43ad2481d84e8d9a1ee1c6e29b90423a86)
* TFETCH add verbose flag to print also the record ltdb heaerRonnie Sahlberg2012-02-071-5/+13
| | | | (This used to be ctdb commit 25d797f61c3b5b7090fb662adde6ed9e434e8a61)
* CTDB: update tfetch so we can specify a hexadecimal string as keyRonnie Sahlberg2012-02-071-10/+45
| | | | (This used to be ctdb commit 70d22efdf104db1fc951263cedfbdb95b0b44342)
* ctdb tool - free some memory used by poptMartin Schwenke2012-02-061-0/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 7339e87019c0ab44522bf160234307472c05dc14)
* ctdb tool - convert control_status() over to use just libctdb()Martin Schwenke2012-02-061-11/+8
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit abe9985e503d998cf597933a594b445de8d3cec6)
* ctdb tool - Fix parse_nodestring() related issuesMartin Schwenke2012-02-061-6/+10
| | | | | | | | An old, buggy version of this code was merged. This fixes it. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit bc4d5d5f0048487776f9f5d9f04a0af2e5d45aac)
* Merge branch 'master' of ssh://git.samba.org/data/git/ctdbRonnie Sahlberg2012-01-032-442/+3
|\ | | | | | | (This used to be ctdb commit 15d8ae8b0f80f95d7839528b8ac60aa0e2485c77)
| * ctdb-tool: adapt formatting of "listvars" output to lenght of longest nameMichael Adam2011-12-231-1/+1
| | | | | | | | (This used to be ctdb commit 295168d99183d2d21f27a8ac6825d421fa866b28)
| * tools/ctdb: allow the "ctdb vacuum" stub to be run without the daemon running.Michael Adam2011-12-231-1/+1
| | | | | | | | (This used to be ctdb commit e71afbf731f06a3b89b64220c7fd1b1ea5492d4a)
| * tools/ctdb: remove functionality of "ctdb vacuum", just keeping a stub.Michael Adam2011-12-231-440/+1
| | | | | | | | (This used to be ctdb commit 8fc4d5018ee6eee8856634095694d3ad0de5b4ae)
* | Rename struct traverse_state to allow tools C files to be #included.Martin Schwenke2011-12-081-3/+3
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 54377ef8b992f92d3a4ece42ee72e37d22cd2de6)
* | ctdb tool - remove verify_node() functionMartin Schwenke2011-12-081-44/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parse_nodestring() checks what this used to check. parse_nodestring() already has the nodemap. It was a 50-50 decision to decide whether to update verify_node() to check against a nodemap that is passed in or to delete it. Signed-off-by: Martin Schwenke <martin@meltin.net> Conflicts: tools/ctdb.c Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2c1baf5ddd3c2cdd2a3f98b8e208d3a48530d1d1)
* | ctdb tool - new command "ctdb nodestatus [nodestring]"Martin Schwenke2011-12-081-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is very much like "ctdb status" but actually returns the status for use in scripts. This can be used in 2 modes: * An optional nodestring is passed directly to the command without using -n. In this mode the current node is asked for the status of all listed nodes. * The nodestring is passed via -n. In this mode the designated nodes will be asked for their status. This is like "ctdb status". These modes can be mixed. For example: ctdb nodestatus 1,2,3 -n 0 asks node 0 for the status of nodes 1, 2 and 3, returning the bitwise OR of their statuses. This version uses the auto_all functionality, so the output isn't necessarily pretty. An improved version that does its own -n processing may appear soon. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 355685a14be17bf4648788f8a72c54790fe03502)
* | ctdb tool - factor out status printing functionsMartin Schwenke2011-12-081-15/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Create 2 new functions: control_status_1_machine() and control_status_1_human() that contain chunks of code from control_status(). We're about to find another purpose for these functions. This should be a no-op. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit fade71539482e8276f57ba3c003fe004d8666ce7)
* | ctdb tool - generalise nodestring parsing for -nMartin Schwenke2011-12-081-93/+186
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Centralise -n nodestring parsing and add the ability to pass a comma-separated list of node numbers. Listing a node that is disconnected or deleted results in failure, similar to the way passing a single node currently works. All of the auto_all commands inherit this functionality. For now, the non-auto_all commands do not inherit this - they need to be individually tweaked. Therefore, we haven't updated the documentation to advertise this feature. Implemented via a new function parse_nodestring() that parses an optional (pass NULL when not available to indicate "current node") comma-separated list of node numbers or "all". parse_nodestring() can be told to be non-fatal for disconnected/deleted nodes so it can also be used in other contexts (yes, coming soon). main() is changed to call this function. A new magic PNN value CTDB_MULTICAST is added and along with a corresponding option.nodes structure member (a talloc-ed array of PNNs). This is also populated for "all" as well. control_status() has new function pretty_print_flags() factored out so pretty-printed flags can be used in error/debug messages. New function is_partially_online() is also factored out - this simplifies some of the logic. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 920e3a732eb9e09004edde6cfb3c7db8a004016f)