]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
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)
committerKarolin Seeger <kseeger@samba.org>
Thu, 1 Jun 2017 06:49:15 +0000 (08:49 +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>
(cherry picked from commit a600d467e2842ab05e429c5a67be5b222ddd1c12)

ctdb/tools/ctdb.c

index 9d48889f29fd328e4ee70317478e32a9066080e4..086735c1342f02840bf35d9b76829bcd2b101152 100644 (file)
@@ -5826,11 +5826,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 {