From ec05f3a21f44e1fd5e089b7a0fffd5265b67cdfc Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 17 Dec 2018 14:16:21 +0530 Subject: glusterd: manage upgrade to current master Scenarios tested: * Upgrade the node when there are stripe / tiering and regular type of volumes are present. - All volumes are started fine (as the change was not on brick volfile) - For tier, the functionality may not even work, as changetimerecorder is not present. - 'gluster volume info' properly shows as 'NOT SUPPORTED' for stripe and tier type of volume. * Upgrade in a rolling upgrade scenario, where an old version is able to connect to higher master. - on a normal volume, if the volfile-server was new, the newer client volfiles needed to have utime xlator conditionally. - with this one change, all other changes seem to work fine. Change-Id: Ib2d3b69dafa02b2c695a735b13c1aa70aba07cb8 updates: bz#1635688 Signed-off-by: Amar Tumballi --- xlators/mgmt/glusterd/src/glusterd-store.c | 15 +++++++-------- xlators/mgmt/glusterd/src/glusterd-volgen.c | 10 ++++++---- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 7fb5c1715b4..124ca2741af 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -3331,14 +3331,13 @@ glusterd_store_update_volinfo(glusterd_volinfo_t *volinfo) break; case GF_CLUSTER_TYPE_TIER: - if (volinfo->tier_info.cold_type == GF_CLUSTER_TYPE_DISPERSE) - volinfo->tier_info - .cold_dist_leaf_count = volinfo->disperse_count; - else - volinfo->tier_info - .cold_dist_leaf_count = glusterd_calc_dist_leaf_count( - volinfo->tier_info.cold_replica_count, 1); - + case GF_CLUSTER_TYPE_STRIPE: + case GF_CLUSTER_TYPE_STRIPE_REPLICATE: + gf_msg(this->name, GF_LOG_CRITICAL, ENOTSUP, + GD_MSG_VOLINFO_STORE_FAIL, + "The volume type is no more supported. Please refer to " + "glusterfs-6.0 release-notes for how to migrate from " + "this volume type"); break; default: diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index d3beb1f68ae..b7c7bd9b638 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -4283,10 +4283,12 @@ client_graph_builder(volgen_graph_t *graph, glusterd_volinfo_t *volinfo, } } - xl = volgen_graph_add(graph, "features/utime", volname); - if (!xl) { - ret = -1; - goto out; + if (conf->op_version >= GD_OP_VERSION_5_0) { + xl = volgen_graph_add(graph, "features/utime", volname); + if (!xl) { + ret = -1; + goto out; + } } /* As of now snapshot volume is read-only. Read-only xlator is loaded -- cgit