summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 7d1af47825b..ad322646eff 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -5468,6 +5468,15 @@ glusterd_snapshot_config_commit (dict_t *dict, char **op_errstr,
}
if (auto_delete) {
+ ret = dict_set_dynstr_with_alloc (conf->opts,
+ GLUSTERD_STORE_KEY_SNAP_AUTO_DELETE,
+ auto_delete);
+ if (ret) {
+ gf_log (this->name, GF_LOG_ERROR, "Could not "
+ "save auto-delete value in conf->opts");
+ goto out;
+ }
+
ret = glusterd_get_next_global_opt_version_str
(conf->opts, &next_version);
if (ret) {
@@ -5476,12 +5485,12 @@ glusterd_snapshot_config_commit (dict_t *dict, char **op_errstr,
goto out;
}
- ret = dict_set_dynstr_with_alloc (conf->opts,
- GLUSTERD_STORE_KEY_SNAP_AUTO_DELETE,
- auto_delete);
+ ret = dict_set_str (conf->opts,
+ GLUSTERD_GLOBAL_OPT_VERSION,
+ next_version);
if (ret) {
- gf_log (this->name, GF_LOG_ERROR, "Could not "
- "save auto-delete value in conf->opts");
+ gf_log (this->name, GF_LOG_ERROR, "Failed to "
+ "set next global opt-version");
goto out;
}