ctdb-tools: Stop "ctdb nodestatus" from always showing all nodes
authorMartin Schwenke <martin@meltin.net>
Wed, 24 May 2017 10:24:54 +0000 (20:24 +1000)
committerMartin Schwenke <martins@samba.org>
Thu, 25 May 2017 23:14:17 +0000 (01:14 +0200)
Exit code should only reflect current or specified nodes too.

Drop an unwanted call to get_nodemap() that overwrites the previously
calculated node map.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12802

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tools/ctdb.c

index ae74ef818cbd4bbaa3a73788095b158b6b511084..14b6957e1f0ced0865df4fcea1fce5dc07ee694a 100644 (file)
@@ -5664,11 +5664,6 @@ static int control_nodestatus(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
                return 1;
        }
 
-       nodemap = get_nodemap(ctdb, false);
-       if (nodemap == NULL) {
-               return 1;
-       }
-
        if (options.machinereadable) {
                print_nodemap_machine(mem_ctx, ctdb, nodemap, ctdb->cmd_pnn);
        } else {