summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.c
diff options
context:
space:
mode:
authorSachin Pandit <spandit@redhat.com>2014-06-04 03:41:35 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-06-11 21:54:07 -0700
commit5906be31845f6a63ff9d5cd15ad0c13af51b81ea (patch)
tree8965923d227408970ddc83e13cb36717525dffee /xlators/mgmt/glusterd/src/glusterd.c
parentb9856eca80e2f820c88f60fdc6cb1427905671af (diff)
glusterd/snapshot : Store the global snapshot config limit in options.
Problem : Initially we used to save the global config limit in glusterd.info, The problem with that approach was glusterd.info is local to a particular glusterd and hence is not synced during the handshake of glusterds. Solution : Store the global snapshot config in options, which is synced during handshake. Change-Id: I4c688bb4052a57df28aadba8581b14e2ddb510ef BUG: 1104642 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/7971 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 255c1db5de9..c2e6fe8b251 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -199,20 +199,32 @@ glusterd_options_init (xlator_t *this)
goto out;
ret = glusterd_store_retrieve_options (this);
- if (ret == 0)
- goto out;
+ if (ret == 0) {
+ goto set;
+ }
ret = dict_set_str (priv->opts, GLUSTERD_GLOBAL_OPT_VERSION,
initial_version);
if (ret)
goto out;
+
ret = glusterd_store_options (this, priv->opts);
if (ret) {
gf_log (this->name, GF_LOG_ERROR, "Unable to store version");
return ret;
}
-out:
+set:
+ if (priv->op_version >= GD_OP_VERSION_3_6_0) {
+ ret = glusterd_check_and_set_config_limit (priv);
+ if (ret) {
+ gf_log (this->name, GF_LOG_ERROR, "Failed "
+ "to set config limit in options");
+ return ret;
+ }
+ }
+
+out:
return 0;
}
int