summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2012-01-04 00:08:14 +0530
committerVijay Bellur <vijay@gluster.com>2012-01-27 04:23:41 -0800
commite99cb60af1e153efd616014da6a54d2f95c119d1 (patch)
treebf6e3e92ae6d200b72fd41e0ee7fed0ff720c431 /cli
parent5a8c58cf6e6c993c8665a31e6f108744ca27ccf4 (diff)
glusterd: provide option to take statedump of the nfs server
Currently the cli command for taking statedump is for glusterfs servers only. Statedump of nfs server cannot be taken. With this patch if one gives nfs as an option to the statedump command, then the nfs-server's statedump is taken. Change-Id: I4ef7a68e608da4aa2f17541d7b42cd78ce2624b6 BUG: 771587 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2579 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd-parser.c5
-rw-r--r--cli/src/cli-cmd-volume.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index afd668ea2..ef69235d6 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -1934,8 +1934,8 @@ cli_cmd_volume_status_parse (const char **words, int wordcount,
gf_boolean_t
cli_cmd_validate_dumpoption (const char *option)
{
- char *opwords[] = {"all", "mem", "iobuf", "callpool", "priv", "fd",
- "inode", NULL};
+ char *opwords[] = {"all", "nfs", "mem", "iobuf", "callpool", "priv",
+ "fd", "inode", NULL};
char *w = NULL;
w = str_getunamb (option, opwords);
@@ -1965,6 +1965,7 @@ cli_cmd_volume_statedump_options_parse (const char **words, int wordcount,
strncat (option_str, words[i], sizeof (words [i]));
strncat (option_str, " ", 1);
}
+
dict = dict_new ();
if (!dict)
goto out;
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 0168628dd..521e3eb84 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -1749,7 +1749,8 @@ struct cli_cmd volume_cmds[] = {
cli_cmd_volume_heal_cbk,
"Start healing of volume specified by <VOLNAME>"},
- {"volume statedump <VOLNAME> [all|mem|iobuf|callpool|priv|fd|inode]...",
+ {"volume statedump <VOLNAME> [nfs] [all|mem|iobuf|callpool|priv|fd|"
+ "inode]...",
cli_cmd_volume_statedump_cbk,
"perform statedump on bricks"},