"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 <[email protected]>
Cc: Liu Yuan <[email protected]>
Signed-off-by: Hitoshi Mitake <[email protected]>
---
 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

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to