[Sheepdog] [PATCH v2 3/6] sheep: transient failure - collie tool changes
yaohaiting.wujue at gmail.com
yaohaiting.wujue at gmail.com
Thu Apr 12 04:38:00 CEST 2012
From: HaiTing Yao <wujue.yht at taobao.com>
collie tool will show the status of node failed/normal
Signed-off-by: HaiTing Yao <wujue.yht at taobao.com>
---
collie/node.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/collie/node.c b/collie/node.c
index a8804f8..1c216ce 100644
--- a/collie/node.c
+++ b/collie/node.c
@@ -26,7 +26,7 @@ static int node_list(int argc, char **argv)
int i;
if (!raw_output)
- printf("M Id Host:Port V-Nodes Zone\n");
+ printf("M Id Host:Port V-Nodes Zone Status\n");
for (i = 0; i < nr_nodes; i++) {
char data[128];
@@ -36,15 +36,15 @@ static int node_list(int argc, char **argv)
if (i == master_idx) {
if (highlight)
printf(TEXT_BOLD);
- printf(raw_output ? "* %d %s %d %d\n" : "* %4d %-20s\t%2d%11d\n",
+ printf(raw_output ? "* %d %s %d %d\n" : "* %4d %-20s\t%2d%11d %s\n",
i, data, node_list_entries[i].nr_vnodes,
- node_list_entries[i].zone);
+ node_list_entries[i].zone, node_list_entries[i].status ? "failed" : "normal");
if (highlight)
printf(TEXT_NORMAL);
} else
- printf(raw_output ? "- %d %s %d %d\n" : "- %4d %-20s\t%2d%11d\n",
+ printf(raw_output ? "- %d %s %d %d\n" : "- %4d %-20s\t%2d%11d %s\n",
i, data, node_list_entries[i].nr_vnodes,
- node_list_entries[i].zone);
+ node_list_entries[i].zone, node_list_entries[i].status ? "failed" : "normal");
}
return EXIT_SUCCESS;
--
1.7.1
More information about the sheepdog
mailing list