12a457
From 090877ff855b914f49d4462e0384a83c4059390b Mon Sep 17 00:00:00 2001
12a457
From: Avra Sengupta <asengupt@redhat.com>
12a457
Date: Fri, 11 Mar 2016 14:01:31 +0530
12a457
Subject: [PATCH 29/80] snapshot/cli: Keep the dict keys uniform
12a457
12a457
snapshot info was using a different dictionary key
12a457
as compared to other snapshot commands. This was
12a457
throwing a recurring error log in cli.log
12a457
12a457
Change-Id: I9eb9a4541c10a45ec7673a23c89c85a7dce9f3ec
12a457
BUG: 1305456
12a457
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
12a457
Reviewed-on: http://review.gluster.org/13677
12a457
Smoke: Gluster Build System <jenkins@build.gluster.com>
12a457
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
12a457
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
12a457
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
12a457
Reviewed-on: https://code.engineering.redhat.com/gerrit/70551
12a457
Tested-by: Rajesh Joseph <rjoseph@redhat.com>
12a457
---
12a457
 cli/src/cli-cmd-parser.c                      |    2 +-
12a457
 xlators/mgmt/glusterd/src/glusterd-snapshot.c |    2 +-
12a457
 2 files changed, 2 insertions(+), 2 deletions(-)
12a457
12a457
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
12a457
index 04c7ae2..1a4c2f5 100644
12a457
--- a/cli/src/cli-cmd-parser.c
12a457
+++ b/cli/src/cli-cmd-parser.c
12a457
@@ -4192,7 +4192,7 @@ cli_snap_info_parse (dict_t *dict, const char **words, int wordcount)
12a457
         cmd = GF_SNAP_INFO_TYPE_VOL;
12a457
 out:
12a457
         if (ret == 0) {
12a457
-                ret = dict_set_int32 (dict, "cmd", cmd);
12a457
+                ret = dict_set_int32 (dict, "sub-cmd", cmd);
12a457
                 if (ret) {
12a457
                         gf_log ("cli", GF_LOG_ERROR, "Could not save "
12a457
                                 "type of snapshot info");
12a457
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
12a457
index 3365e5f..4912f56 100644
12a457
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
12a457
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
12a457
@@ -3688,7 +3688,7 @@ glusterd_handle_snapshot_info (rpcsvc_request_t *req, glusterd_op_t op,
12a457
         GF_VALIDATE_OR_GOTO (this->name, dict, out);
12a457
 
12a457
 
12a457
-        ret = dict_get_int32 (dict, "cmd", &cmd);
12a457
+        ret = dict_get_int32 (dict, "sub-cmd", &cmd);
12a457
         if (ret) {
12a457
                 gf_msg (this->name, GF_LOG_ERROR, 0,
12a457
                         GD_MSG_DICT_GET_FAILED, "Failed to get type "
12a457
-- 
12a457
1.7.1
12a457