From 2dea3b34755d9af1d1c1ffe517c6a087cf44512a Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Tue, 27 Mar 2012 15:52:47 +0530 Subject: cli,glusterd: more volume status improvements The major changes are, * "volume status" now supports getting details of the self-heal daemon processes for replica volumes. A new cli options "shd", similar to "nfs", has been introduced for this. "detail", "fd" and "clients" status ops are not supported for self-heal daemons. * The default/normal ouput of "volume status" has been enhanced to contain information about nfs-server and self-heal daemon processes as well. Some tweaks have been done to the cli output to show appropriate output. Also, changes have been done to rebalance/remove-brick status, so that hostnames are displayed instead of uuids. Change-Id: I3972396dcf72d45e14837fa5f9c7d62410901df8 BUG: 803676 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.com/3016 Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Reviewed-by: Vijay Bellur --- cli/src/cli-cmd-parser.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'cli/src/cli-cmd-parser.c') diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 4c86ab488c5..ba9ca63d849 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1905,6 +1905,8 @@ cli_cmd_volume_status_parse (const char **words, int wordcount, if (cmd == GF_CLI_STATUS_NONE) { if (!strcmp (words[3], "nfs")) { cmd |= GF_CLI_STATUS_NFS; + } else if (!strcmp (words[3], "shd")) { + cmd |= GF_CLI_STATUS_SHD; } else { cmd = GF_CLI_STATUS_BRICK; ret = dict_set_str (dict, "brick", @@ -1940,12 +1942,24 @@ cli_cmd_volume_status_parse (const char **words, int wordcount, goto out; if (!strcmp (words[3], "nfs")) { - if (cmd == GF_CLI_STATUS_FD) { - cli_out ("FD status not available for NFS"); + if (cmd == GF_CLI_STATUS_FD || + cmd == GF_CLI_STATUS_DETAIL) { + cli_out ("Detail/FD status not available" + " for NFS Servers"); ret = -1; goto out; } cmd |= GF_CLI_STATUS_NFS; + } else if (!strcmp (words[3], "shd")){ + if (cmd == GF_CLI_STATUS_FD || + cmd == GF_CLI_STATUS_CLIENTS || + cmd == GF_CLI_STATUS_DETAIL) { + cli_out ("Detail/FD/Clients status not " + "available for Self-heal Daemons"); + ret = -1; + goto out; + } + cmd |= GF_CLI_STATUS_SHD; } else { cmd |= GF_CLI_STATUS_BRICK; ret = dict_set_str (dict, "brick", (char *)words[3]); -- cgit