From a36c82375723f51e49c0830d47520392d859c307 Mon Sep 17 00:00:00 2001 From: hari gowtham Date: Wed, 29 May 2019 12:26:01 +0530 Subject: 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 --- xlators/mgmt/glusterd/src/glusterd-store.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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) -- cgit