summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2015-10-28 15:18:07 +0530
committerRajesh Joseph <rjoseph@redhat.com>2015-11-02 22:34:37 -0800
commit2e56bde3ea952beabd27cdf8a3a10da563a00bcc (patch)
tree99194a04e1e538f1abd3ec2fe614e8cf21c35a1e /xlators
parentaf8b450df8dca2b07bcfc6c32f17bc678697e9f2 (diff)
snapshot: Don't display snapshot's hard-limit and soft-limit in vol info
The snap-max-hard-limit being displayed in the volume info currently is propagated from system's snap-max-hard-limit as that is a global option common for all volumes, and hence ends up showing the system's snap-max-hard-limit. We should not be displaying snap-max-hard-limit and snap-max-soft-limit in the volume info at all, as these are snap config options and should be set and displayed via snap config command. Modified bug-1113476.t to test the same behaviour. Change-Id: I90891f0cf7fb39fd686787297c7f7cd8c1e7daa1 BUG: 1276018 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/12443 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 24e0084a093..d3f3be20a9b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -307,6 +307,15 @@ _build_option_key (dict_t *d, char *k, data_t *v, void *tmp)
(strcmp (k, "features.soft-limit") == 0))
return 0;
}
+
+ /* snap-max-hard-limit and snap-max-soft-limit are system *
+ * options set and managed by snapshot config option. Hence *
+ * they should not be displayed in gluster volume info. *
+ */
+ if ((strcmp (k, "snap-max-hard-limit") == 0) ||
+ (strcmp (k, "snap-max-soft-limit") == 0))
+ return 0;
+
snprintf (reconfig_key, 256, "volume%d.option.%s",
pack->vol_count, k);
ret = dict_set_str (pack->dict, reconfig_key, v->data);