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

536 Commits

Author SHA1 Message Date
Ronnie Sahlberg
fa3a06246a STICKY: add prototype code to make records stick to a node to "calm" down if 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)
2012-03-20 17:12:19 +11:00
Ronnie Sahlberg
6a493a0b08 STATISTICS: add per-db hop count statistics
(This used to be ctdb commit 1c976d83b1d7dac6f0ef81306774998e4c8b56a1)
2012-03-20 12:11:55 +11:00
Ronnie Sahlberg
c9f7c981e2 CTDB: change how the hop count buckets are displayed in ctdb statistics
(This used to be ctdb commit 05923a14bc8ae8e3c5cda28ff4e0fb0d473d5f7d)
2012-03-20 11:43:09 +11:00
Ronnie Sahlberg
038c946e80 add max hop count buckets to see how bad hopcounts are
(This used to be ctdb commit 7d3931298e6477d92f43652c3006b0c426cb1307)
2012-03-20 11:20:53 +11:00
Ronnie Sahlberg
b3ddf6901d Merge remote branch 'martins/master'
(This used to be ctdb commit af72f8bc05f78983f9624d81788f9d89af474b11)
2012-03-15 16:09:41 +11:00
Ronnie Sahlberg
ef2bd0b016 When adding ips to nodes, set up a deferred rebalance for the whole node to trigger after 60 seconds in case the normal ipreallocated is not sufficient to trigger rebalance.
(This used to be ctdb commit 4340263b219d75c39f8de22abe3f6f1c1ee63ea2)
2012-02-28 06:56:04 +11:00
Volker Lendecke
5e3b13a32a FreeBSD does not define s6_addr32, only s6_addr
Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit d657af4fb68ce3f7c462856f2934f6bf169e120b)
2012-02-13 16:20:12 +01:00
Martin Schwenke
629553667e ctdb tool: fix thinko in nodestatus command output
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)
2012-02-13 13:31:18 +11:00
Ronnie Sahlberg
68245eee4e READONLY: allow specifying the db name for setdbreadonly instead of just the hash
(This used to be ctdb commit 3c2117e8e4156e0048fbd2c94546112f0c588522)
2012-02-13 10:27:59 +11:00
Ronnie Sahlberg
73f8be16c6 ReadOnly: add per-database statistics to view how much delegations/revokes we have
(This used to be ctdb commit 751ed46197661eb841042ab6a02855a51dd0b17c)
2012-02-08 15:29:27 +11:00
Ronnie Sahlberg
1eafa68f0f STATISTICS: add total counts for number of delegations and number of revokes
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)
2012-02-08 13:42:30 +11:00
Ronnie Sahlberg
b6de9d3d19 Ad test tool to store data and ctdb header into a local tdb file
(This used to be ctdb commit c6433e43ad2481d84e8d9a1ee1c6e29b90423a86)
2012-02-07 12:14:57 +11:00
Ronnie Sahlberg
c3bab541c9 TFETCH add verbose flag to print also the record ltdb heaer
(This used to be ctdb commit 25d797f61c3b5b7090fb662adde6ed9e434e8a61)
2012-02-07 10:53:49 +11:00
Ronnie Sahlberg
daf28e095e CTDB: update tfetch so we can specify a hexadecimal string as key
(This used to be ctdb commit 70d22efdf104db1fc951263cedfbdb95b0b44342)
2012-02-07 10:21:12 +11:00
Martin Schwenke
e2ceae48e3 ctdb tool - free some memory used by popt
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 7339e87019c0ab44522bf160234307472c05dc14)
2012-02-06 16:00:24 +11:00
Martin Schwenke
7a04587e88 ctdb tool - convert control_status() over to use just libctdb()
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit abe9985e503d998cf597933a594b445de8d3cec6)
2012-02-06 16:00:23 +11:00
Martin Schwenke
bfab62dd41 ctdb tool - Fix parse_nodestring() related issues
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)
2012-02-06 16:00:23 +11:00
Ronnie Sahlberg
e648045499 Merge branch 'master' of ssh://git.samba.org/data/git/ctdb
(This used to be ctdb commit 15d8ae8b0f80f95d7839528b8ac60aa0e2485c77)
2012-01-03 12:40:15 +11:00
Michael Adam
5fdd7fefb8 ctdb-tool: adapt formatting of "listvars" output to lenght of longest name
(This used to be ctdb commit 295168d99183d2d21f27a8ac6825d421fa866b28)
2011-12-23 17:39:10 +01:00
Michael Adam
491c63c2a8 tools/ctdb: allow the "ctdb vacuum" stub to be run without the daemon running.
(This used to be ctdb commit e71afbf731f06a3b89b64220c7fd1b1ea5492d4a)
2011-12-23 17:39:05 +01:00
Michael Adam
d7611212c3 tools/ctdb: remove functionality of "ctdb vacuum", just keeping a stub.
(This used to be ctdb commit 8fc4d5018ee6eee8856634095694d3ad0de5b4ae)
2011-12-23 17:39:05 +01:00
Martin Schwenke
89b01c8e7b Rename struct traverse_state to allow tools C files to be #included.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 54377ef8b992f92d3a4ece42ee72e37d22cd2de6)
2011-12-08 17:21:24 +11:00
Martin Schwenke
a2095caf91 ctdb tool - remove verify_node() function
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)
2011-12-08 17:21:24 +11:00
Martin Schwenke
d5b1a6a9c6 ctdb tool - new command "ctdb nodestatus [nodestring]"
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)
2011-12-08 17:21:17 +11:00
Martin Schwenke
b646815567 ctdb tool - factor out status printing functions
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)
2011-12-08 17:18:19 +11:00
Martin Schwenke
8b74037633 ctdb tool - generalise nodestring parsing for -n
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)
2011-12-08 17:00:17 +11:00
Martin Schwenke
7f25864db0 ctdb tool - move parsing of nodestring to where it is needed
This puts the parsing and checking logic close together.  This makes
it easy to change the parsing code.  Changed parsing code can now
easily use both old client code and libctdb since both are guaranteed
to be setup.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 57fb074a65dc56168fc3813b79a5bab4b3727cf3)
2011-12-06 13:59:32 +11:00
Martin Schwenke
dbd452c801 ctdb tool - replace fprintf with DEBUG
It's the only one in the file.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit bf1174ef699b06485b36ee8ae70412be0759e142)
2011-12-06 13:59:32 +11:00
Martin Schwenke
ba6e6f689c ctdb tool - short circuit most of the logic in main for non-daemon commands
This allows all that logic to be hacked a little more easily.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f93ffeee7b9e9ca5dd116655bdc7f89fc987ed8a)
2011-12-06 13:59:32 +11:00
Martin Schwenke
7e9f998745 ctdb tool - commands that don't use the daemon can't take -n/--node
It just doesn't make sense!

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit c4b72683eb046007fbc2e60b4a54bc91faf4cf7e)
2011-12-06 13:59:32 +11:00
Martin Schwenke
5f69ad3c0a ctdb tool - simplify main() by taking most code out of a loop
Most of the action in main() happens inside a for loop and an if
statement.  This causes 2 levels of extra indent for the code and
makes it harder to read.

Instead, the current body of the loop is put below the loop and its
corresponding failure check.

To see how small this change really is, view with "diff -w".  ;-)

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 8527396b7290cfc8378779631e91d2ae09e2a106)
2011-12-06 13:59:32 +11:00
Ronnie Sahlberg
609149bdc8 LibCTDB: Add support for the 'get interfaces' control and update the ctdb tool to use this interface
(This used to be ctdb commit 77dc0c7351071243d9096d3607d7499c82f46ec0)
2011-12-06 13:12:18 +11:00
Ronnie Sahlberg
7d31c64c1c ctdb: use libctdb version of check-srvids call
(This used to be ctdb commit 36105b7283df729946e0a2ed61a696a14221efa6)
2011-11-30 10:00:27 +11:00
Ronnie Sahlberg
5a1e8df451 check_srvids: remove the <pnn> from the commandline so that we only specify the list of <srvids>
Specifying the pnn can be done via '-n <pnn>'

(This used to be ctdb commit e9250775f5a1234f27a1a62caa902d7b86194285)
2011-11-30 09:50:12 +11:00
Volker Lendecke
6f657dadd3 Add "ctdb check_srvid"
(This used to be ctdb commit 92a391a81d0697956b96e96e39bb1b9d13e18097)
2011-11-30 09:02:26 +11:00
Ronnie Sahlberg
3cbff2edd8 LibCTDB: add get persistent db seqnum control
(This used to be ctdb commit 6e96a62494bbb2c7b0682ebf0c2115dd2f44f7af)
2011-11-30 08:48:14 +11:00
Michael Adam
31d62794fe ctdb: add an option --print-recordflags to trigger printing record flags in catdb and dumpdbbackup
This changes the default behaviour to not print record flags.

(This used to be ctdb commit 2d2ce07c51055d9400b22cd3c1fd682597cb921c)
2011-11-29 13:43:35 +01:00
Michael Adam
e6923904e8 ctdb: add an option --print-hash to enable printing of record hashes when dumping dbs
(This used to be ctdb commit efc033c28ade97f9884794256d59a4553e052d5f)
2011-11-29 13:43:34 +01:00
Michael Adam
86cd78efee ctdb: add an option --print-lmaster to enable printing of lmaster in "ctdb catdb"
(This used to be ctdb commit 326f88ef622620cb9e0569c4497bc0e86124beaa)
2011-11-29 13:43:33 +01:00
Michael Adam
dc98c12ac9 ctdb: add an option --print-datasize to only print datasize instead of dumping data in db dumps
Used in catdb, cattdb and dumpdbbackup.

(This used to be ctdb commit dd866116041e71cbf91e7fd91edcc9501634051d)
2011-11-29 13:43:32 +01:00
Michael Adam
1fcc7651f4 ctdb: add an option --print-emptyrecords to enable printing of empty records in dumping databases
this option is used with the commands catdb, cattdb and dumpdbbackup.

(This used to be ctdb commit 6ec68a2e667f66d2b194fe48cb75229a2777842e)
2011-11-29 10:30:24 +01:00
Martin Schwenke
08ebcf6e6a Fix ctdb scriptstatus -n all
This didn't have auto_all set as true.  However, there's no special
code to handle "-n all" and it just fails.  If auto_all works for
status then it might as well work for scriptstatus.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 3084220e2aac3664511969f10cad206e505150a0)
2011-11-10 15:41:03 +11:00
Mathieu Parent
fa197073cd config can be in /etc/default/ instead of /etc/sysconfig/ (ctdb_gnostics part)
(This used to be ctdb commit b6a9dacefd8f031677702f0fbf6b321beb4c4d54)
2011-11-08 16:32:03 +11:00
Ronnie Sahlberg
afd0b63273 Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-master
(This used to be ctdb commit d772743e9a4d4d40eb95cd8d5178708e77057b79)
2011-11-08 14:01:22 +11:00
Ronnie Sahlberg
0f92fa224c RB_TREE: Add mechanism to abort a traverse
This patch changes the callback signature for traversal
functions to allow a client to abort a traverse before it finishes.
Updates to all callers and examples as well as rb-test tool.

(This used to be ctdb commit 8ab0c63ad36cfbbb1e5fed46a1f4c47b1fdb581f)
2011-11-08 13:40:28 +11:00
Martin Schwenke
2e3febe283 onnode: unset EXTRA_SSH_OPTS when using fakessh
This case was never tested and fakessh obviously won't handle the
extra arguments.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 02184bd5b9ab94cdf2b9ff92e56a509f92f9e4aa)
2011-10-18 11:51:06 +11:00
Ronnie Sahlberg
24b56c62b1 Merge branch 'master' of ssh://git.samba.org/data/git/ctdb
(This used to be ctdb commit dd9f82dbe2346c7143b0229e3611c402ee8c4025)
2011-10-17 15:08:39 +11:00
Martin Schwenke
71b8015ccf Make ctdb_diagnostics more resilient to uncontactable nodes.
Current behaviour is for onnode to timeout (for about 20s) for each
attempted ssh to a down node.  With 40 or 50 invocations of onnode
this takes a long time.

2 changes to work around this:

* If EXTRA_SSH_OPTS (which is passed to ssh by onnode) does not
  contains a ConnectTimeout= setting then add a setting for a 5 second
  timeout.

* Filter the nodes before starting any diagnosis, taking out any "bad
  nodes" that are uncontactable via onnode.

  In the nodes summary at the beginning of the output, print
  information about any "bad nodes".

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 8c3b6427dbaade87e1a0f5590f0894c2e69b31a3)
2011-10-13 14:27:34 +11:00
Gregor Beck
28a434051c ltdbtool: ignore empty (deleted) records per default.
Add option -e to get the old behaviour and process empty records too.

Signed-off-by: Michael Adam <obnox@samba.org>

(This used to be ctdb commit d9859540c2000864bc6c58be5afe19aa3b1064b2)
2011-10-12 22:38:02 +02:00
Ronnie Sahlberg
8a104331e8 Change the 'This Node' column of the machinereadable output for 'ctdb status -Y' to Y/N instead of 1/0
1/0 is unsuitable since it can be useful to check 'if a column is "1" there is something wrong with that node'

(This used to be ctdb commit b963f5e40b1e73a60363568da88557cad9e58a28)
2011-09-21 15:41:28 +10:00