summaryrefslogtreecommitdiffstats
path: root/ctdb/tools
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2014-02-28 20:16:34 +1100
committerAmitay Isaacs <amitay@samba.org>2014-03-23 04:20:14 +0100
commit5fb7e386ac4452786512d077a00b4907ef39cb51 (patch)
tree9a575e4ed9b70d14ae08872c45f2524a1e37555f /ctdb/tools
parent33b1fcbd7083668cfd58b1cfb1172b6134cd07ca (diff)
downloadsamba-5fb7e386ac4452786512d077a00b4907ef39cb51.tar.gz
samba-5fb7e386ac4452786512d077a00b4907ef39cb51.tar.xz
samba-5fb7e386ac4452786512d077a00b4907ef39cb51.zip
ctdb-tools-ctdb: Fixes for "lvs" and "lvsmaster" commands
The index of the nodes array in nodemap isn't the PNN. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/tools')
-rw-r--r--ctdb/tools/ctdb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 3eef1e21179..4211348ac6d 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -3602,7 +3602,7 @@ static int control_lvs(struct ctdb_context *ctdb, int argc, const char **argv)
}
}
- printf("%d:%s\n", i,
+ printf("%d:%s\n", nodemap->nodes[i].pnn,
ctdb_addr_to_str(&nodemap->nodes[i].addr));
}
@@ -3681,9 +3681,10 @@ static int control_lvsmaster(struct ctdb_context *ctdb, int argc, const char **a
}
if (options.machinereadable){
- printf("%d\n", i);
+ printf("%d\n", nodemap->nodes[i].pnn);
} else {
- printf("Node %d is LVS master\n", i);
+ printf("Node %d is LVS master\n",
+ nodemap->nodes[i].pnn);
}
ret = 0;
goto done;