summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2015-09-14 17:09:29 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2015-11-18 04:43:53 -0800
commit89962044417e1d01a31dee72357d5ebcae0f44cb (patch)
tree198ef582410768fc46cf644848f5fcb179327636
parent50cde2853bd144ff19ac8b6ac06e993cfb734f63 (diff)
glusterd: call glusterd_store_volinfo in bump up op-version
After an upgrade, op-version is expected to be updated through gluster volume set. If the new version introduces any feature which changes volinfo structure without storing the default values of these new options would result into cksum issues. Backport of: >Change-Id: I57b4667f3403839811735bf66bef29e5200a9241 >BUG: 1262805 >Signed-off-by: Atin Mukherjee <amukherj@redhat.com> >Reviewed-on: http://review.gluster.org/12171 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> >Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> >(cherry picked from commit c3ed484af54e32c1ef2300cda652604d75dc9d20) Change-Id: I0c8d3cc7722b4a04e129c01792b80e27a7e8e59f BUG: 1277823 Reviewed-on: http://review.gluster.org/12500 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 8c341153db4..3737e1aef0c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1805,6 +1805,7 @@ glusterd_op_set_all_volume_options (xlator_t *this, dict_t *dict)
char *next_version = NULL;
gf_boolean_t quorum_action = _gf_false;
uint32_t op_version = 0;
+ glusterd_volinfo_t *volinfo = NULL;
conf = this->private;
ret = dict_get_str (dict, "key1", &key);
@@ -1845,6 +1846,12 @@ glusterd_op_set_all_volume_options (xlator_t *this, dict_t *dict)
"Failed to store op-version.");
}
}
+ list_for_each_entry (volinfo, &conf->volumes, vol_list) {
+ ret = glusterd_store_volinfo
+ (volinfo, GLUSTERD_VOLINFO_VER_AC_INCREMENT);
+ if (ret)
+ goto out;
+ }
/* No need to save cluster.op-version in conf->opts
*/
goto out;