IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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)
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)
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)
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)
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)
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)
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)
It's the only one in the file.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit bf1174ef699b06485b36ee8ae70412be0759e142)
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)
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)
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)
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)
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)
Regular "ctdb status" output flags which node is the local node, do the
same for machine readable output.
(This used to be ctdb commit 3885141f37724b3dea61b45fbac38489ec356588)
Following connection to the local ctdbd, ctdb_cmdline_client() currently
issues a CTDB_CONTROL_GET_PNN request with a fixed 3 second timeout.
The ctdb cmd line client accepts a --timelimit argument for specifying
a per request timeout, pass this value through to ctdb_cmdline_client()
for use as a CTDB_CONTROL_GET_PNN request timeout.
(This used to be ctdb commit 0634d0305f42f17048b6830733767e8dc300e11c)
let all databases default to not support this until enabled through this control
(This used to be ctdb commit 908a07c42e5135a3ba30a625fc4f4e4916de197a)
the persistent flag.
This is the same size as the original boolean but allows ut to add additional flags for the database
(This used to be ctdb commit 7462761638d25880ad46024ad4ef21667eb99a98)
Lines in machine readable output always start with a colon (':').
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit a779d83a6213e2ba21621f7e090964428f89422d)
The API for this function has changed since the 1.2 branch where readonly locks are being merged from
(This used to be ctdb commit d01b9716d3e50f4c6d102e8411f0401b0f499699)
Since some record flags may differ between nodes in the cluster when read only delegations are in use, cattdb is needed when you need to know the exact flag settings on the current node itself.
(This used to be ctdb commit d2342b680a3a8160d903d12550b86ee21c8b277d)
that tries to bind to the specified port on INADDR_ANY.
This can be used for testing if a service is listening to that port or not.
Errors are printed to stdout and the returned status code is either 0 : if we managed to bind to the port (in which case the service is NOT listening on that bort) or the value of errno that stopped us from binding to a port.
errno for EADDRINUSE is 98 so a script using this command should check the status code against the value 98.
If this command returns 98 it means the service is listening to the specified port.
(This used to be ctdb commit 04cbb490c5a075080923fde58af7082572c55c43)
This makes it 2, since this error corresponds loosely to ENOENT.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 1bf289abdd3067a40e9a67091aba78222d13eddf)