Skip to content

Commit

Permalink
Minor fixes for surrogatectl cli.
Browse files Browse the repository at this point in the history
  • Loading branch information
skruger committed Oct 14, 2011
1 parent bc62690 commit 853655f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/surrogate_cli.erl
Expand Up @@ -30,7 +30,7 @@ exec_cmds([Cmd|Args]) ->
vip_cmd(["list"|_]) ->
case cluster_vip_manager:get_vip_list() of
List when is_list(List) ->
FormatStr = "~40s | ~8s | ~p~n",
FormatStr = "~40s | ~8s | ~500p~n",
io:format(FormatStr,["Address","Status",'Node List']),
lists:foreach(fun({IP,En,Nodes}) -> io:format(FormatStr,[proxylib:format_inet(IP),atom_to_list(En),Nodes]) end, List);
Err ->
Expand Down
6 changes: 2 additions & 4 deletions surrogatectl
Expand Up @@ -26,10 +26,8 @@ main(Args) ->
%io:format("Config: ~p~n",[Config]),
case net_adm:ping(Node) of
pong ->
io:format("Node connected: ~p~n",[Node]),
R = rpc:call(Node,surrogate_cli,exec_cmds,[Args]),
%decode_cmds(Args);
io:format("~p: ~p~n",[Node,R]),
%io:format("Node connected: ~p~n",[Node]),
rpc:call(Node,surrogate_cli,exec_cmds,[Args]),
ok;
pang ->
io:format("Error: node ~p could not connect to node ~p with cookie ~p~n",[node(),Node,erlang:get_cookie()])
Expand Down

0 comments on commit 853655f

Please sign in to comment.