ctdb tool: fix thinko in nodestatus command output
authorMartin Schwenke <martin@meltin.net>
Mon, 13 Feb 2012 02:31:18 +0000 (13:31 +1100)
committerMartin Schwenke <martin@meltin.net>
Mon, 13 Feb 2012 02:31:18 +0000 (13:31 +1100)
If used with -n <nodes> the "current" node needs to change.

Signed-off-by: Martin Schwenke <martin@meltin.net>
tools/ctdb.c

index 051a270d6ee33b61bcf73ebf40fee89b57aed115..6bc3b6ebf28e4d6a2f7cf47db24af59a18b27d18 100644 (file)
@@ -936,7 +936,7 @@ static int control_nodestatus(struct ctdb_context *ctdb, int argc, const char **
                printf("Number of nodes:%d\n", (int) talloc_array_length(nodes));
        }
 
-       if (!ctdb_getpnn(ctdb_connection, CTDB_CURRENT_NODE, &mypnn)) {
+       if (!ctdb_getpnn(ctdb_connection, options.pnn, &mypnn)) {
                DEBUG(DEBUG_ERR, ("Unable to get PNN from local node\n"));
                return -1;
        }