diff options
author | hari gowtham <hgowtham@redhat.com> | 2019-05-29 12:26:01 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2019-06-03 13:31:54 +0000 |
commit | a36c82375723f51e49c0830d47520392d859c307 (patch) | |
tree | 71c33b5613c48b70646c00d7364a9fe34171d1ff /xlators/mgmt | |
parent | 0f29cabac22c48a0895e2b136f3fd48d9577052b (diff) |
glusterd/tier: gluster upgrade broken because of tier
Problem: While tier code was removed, the is_tier_enabled
related to tier wasn't handled for upgrade.
As this option was missing in the info file, the checksum
mismatch issue happens during upgrade.
This results in the peer rejections happening.
Fix: use the op_version check and note down the is_tier_enabled
always. This way it will be dummy key, but the future upgrades
will work fine.
NOTE: Just having the key from 3.10 to 7 will cause issues when
upgraded from 5 to 8 or any such upgrade which skips the version
where we handle it.
Change-Id: I9951e2b74f16e58e884e746c34dcf53e559c7143
fixes: bz#1714973
Signed-off-by: hari gowtham <hgowtham@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 038355dcf32..afd101ce54d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -961,6 +961,15 @@ glusterd_volume_exclude_options_write(int fd, glusterd_volinfo_t *volinfo) } total_len += ret; } + if (conf->op_version >= GD_OP_VERSION_3_10_0) { + ret = snprintf(buf + total_len, sizeof(buf) - total_len, "%s=0\n", + GF_TIER_ENABLED); + if (ret < 0 || ret >= sizeof(buf) - total_len) { + ret = -1; + goto out; + } + total_len += ret; + } ret = gf_store_save_items(fd, buf); if (ret) |