1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00
samba-mirror/ctdb/include
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
..
cmdline.h moved cmdline.c to common code 2007-04-17 22:16:50 +10:00
ctdb_client.h ctdb: add an option --print-recordflags to trigger printing record flags in catdb and dumpdbbackup 2011-11-29 13:43:35 +01:00
ctdb_private.h LibCTDB: Add support for the 'get interfaces' control and update the ctdb tool to use this interface 2011-12-06 13:12:18 +11:00
ctdb_protocol.h ctdb tool - generalise nodestring parsing for -n 2011-12-08 17:00:17 +11:00
ctdb_typesafe_cb.h rename ccan/typesafe_cb.h to ctdb_typesafe_cb.h and 2010-06-02 09:18:48 +10:00
ctdb.h LibCTDB: Add support for the 'get interfaces' control and update the ctdb tool to use this interface 2011-12-06 13:12:18 +11:00
idtree.h - added in idtree for efficient reqid handling 2006-11-28 20:48:34 +11:00
includes.h Added some #ifndefs to stop files being included multiple times. 2011-11-11 14:31:50 +11:00