summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2011-12-07 13:35:49 +1100
committerMartin Schwenke <martin@meltin.net>2011-12-08 17:21:24 +1100
commita2095caf91ffc2c052816773d4e8f1777841f9cc (patch)
tree9bbde245610caea73c9c04aed7fe2c68bb709b84
parentd5b1a6a9c6ef4f80e62f15663ec693763eaf72f5 (diff)
downloadsamba-a2095caf91ffc2c052816773d4e8f1777841f9cc.tar.gz
samba-a2095caf91ffc2c052816773d4e8f1777841f9cc.tar.xz
samba-a2095caf91ffc2c052816773d4e8f1777841f9cc.zip
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)
-rw-r--r--ctdb/tools/ctdb.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 6e0cc2fb2d..77c45dc58e 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -73,47 +73,6 @@ static int control_version(struct ctdb_context *ctdb, int argc, const char **arg
abort(); \
}} while (0)
-/*
- verify that a node exists and is reachable
- */
-static void verify_node(struct ctdb_context *ctdb)
-{
- int ret;
- struct ctdb_node_map *nodemap=NULL;
-
- if (options.pnn == CTDB_CURRENT_NODE) {
- return;
- }
- if (options.pnn == CTDB_BROADCAST_ALL) {
- return;
- }
-
- /* verify the node exists */
- if (ctdb_ctrl_getnodemap(ctdb, TIMELIMIT(), CTDB_CURRENT_NODE, ctdb, &nodemap) != 0) {
- DEBUG(DEBUG_ERR, ("Unable to get nodemap from local node\n"));
- exit(10);
- }
- if (options.pnn >= nodemap->num) {
- DEBUG(DEBUG_ERR, ("Node %u does not exist\n", options.pnn));
- exit(ERR_NONODE);
- }
- if (nodemap->nodes[options.pnn].flags & NODE_FLAGS_DELETED) {
- DEBUG(DEBUG_ERR, ("Node %u is DELETED\n", options.pnn));
- exit(ERR_DISNODE);
- }
- if (nodemap->nodes[options.pnn].flags & NODE_FLAGS_DISCONNECTED) {
- DEBUG(DEBUG_ERR, ("Node %u is DISCONNECTED\n", options.pnn));
- exit(ERR_DISNODE);
- }
-
- /* verify we can access the node */
- ret = ctdb_ctrl_getpnn(ctdb, TIMELIMIT(), options.pnn);
- if (ret == -1) {
- DEBUG(DEBUG_ERR,("Can not access node. Node is not operational.\n"));
- exit(10);
- }
-}
-
/* Pretty print the flags to a static buffer in human-readable format.
* This never returns NULL!
*/
@@ -5525,9 +5484,6 @@ int main(int argc, const char *argv[])
usage();
}
- /* verify the node exists */
- verify_node(ctdb);
-
if (options.pnn == CTDB_CURRENT_NODE) {
options.pnn = options.nodes[0];
}