[sheepdog] [PATCH] collie: "node kill" needs node list before its execution

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Fri Oct 19 13:21:39 CEST 2012


"collie node kill" needs node list before its execution. It seems that
the flag SUBCMD_FLAG_NEED_NODELIST is eliminated in the commit:
8555a67353e87b0292e90a5d59e3d60a26f6eace

After this commit, collie node kill exits with an error like this:
    Invalid node id '0'

Cc: levin li <xingke.lwp at taobao.com>
Cc: Liu Yuan <tailai.ly at taobao.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
 collie/node.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/collie/node.c b/collie/node.c
index b5aeec1..161c295 100644
--- a/collie/node.c
+++ b/collie/node.c
@@ -212,7 +212,7 @@ static int node_kill(int argc, char **argv)
 
 static struct subcommand node_cmd[] = {
 	{"kill", "<node id>", "aprh", "kill node", NULL,
-	 SUBCMD_FLAG_NEED_THIRD_ARG, node_kill},
+	 SUBCMD_FLAG_NEED_THIRD_ARG | SUBCMD_FLAG_NEED_NODELIST, node_kill},
 	{"list", NULL, "aprh", "list nodes", NULL,
 	 SUBCMD_FLAG_NEED_NODELIST, node_list},
 	{"info", NULL, "aprh", "show information about each node", NULL,
-- 
1.7.2.5




More information about the sheepdog mailing list