diff options
author | Hari Gowtham <hgowtham@redhat.com> | 2019-05-02 18:33:34 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-05-27 07:50:24 +0000 |
commit | e1cc4275583dfd8ae8d0433587f39854c1851794 (patch) | |
tree | 5b09910701f803bbc4355f537a698a017513f70c /xlators/mgmt/glusterd/src/glusterd-volume-ops.c | |
parent | cce775726af28c602d99f73a65439a2564790381 (diff) |
glusterd/tier: remove tier related code from glusterd
The handler functions are pointed to dummy functions.
The switch case handling for tier also have been moved to
point default case to avoid issues, if reintroduced.
The tier changes in DHT still remain as such.
updates: bz#1693692
Change-Id: I80d80c9a3eb862b4440a36b31ae82b2e9d92e4dc
Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-ops.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index fa3d620a4b0..991063ee487 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -779,51 +779,6 @@ glusterd_handle_cli_delete_volume(rpcsvc_request_t *req) return glusterd_big_locked_handler(req, __glusterd_handle_cli_delete_volume); } -int -glusterd_handle_shd_option_for_tier(glusterd_volinfo_t *volinfo, char *value, - dict_t *dict) -{ - int count = 0; - char dict_key[64] = { - 0, - }; - int keylen; - char *key = NULL; - int ret = 0; - - key = gd_get_shd_key(volinfo->tier_info.cold_type); - if (key) { - count++; - keylen = snprintf(dict_key, sizeof(dict_key), "key%d", count); - ret = dict_set_strn(dict, dict_key, keylen, key); - if (ret) - goto out; - keylen = snprintf(dict_key, sizeof(dict_key), "value%d", count); - ret = dict_set_strn(dict, dict_key, keylen, value); - if (ret) - goto out; - } - - key = gd_get_shd_key(volinfo->tier_info.hot_type); - if (key) { - count++; - keylen = snprintf(dict_key, sizeof(dict_key), "key%d", count); - ret = dict_set_strn(dict, dict_key, keylen, key); - if (ret) - goto out; - keylen = snprintf(dict_key, sizeof(dict_key), "value%d", count); - ret = dict_set_strn(dict, dict_key, keylen, value); - if (ret) - goto out; - } - - ret = dict_set_int32n(dict, "count", SLEN("count"), count); - if (ret) - goto out; - -out: - return ret; -} static int glusterd_handle_heal_options_enable_disable(rpcsvc_request_t *req, dict_t *dict, glusterd_volinfo_t *volinfo) @@ -863,23 +818,6 @@ glusterd_handle_heal_options_enable_disable(rpcsvc_request_t *req, dict_t *dict, value = "disable"; } - /* Convert this command to volume-set command based on volume type */ - if (volinfo->type == GF_CLUSTER_TYPE_TIER) { - switch (heal_op) { - case GF_SHD_OP_HEAL_ENABLE: - case GF_SHD_OP_HEAL_DISABLE: - ret = glusterd_handle_shd_option_for_tier(volinfo, value, dict); - if (!ret) - goto set_volume; - goto out; - /* For any other heal_op, including granular-entry heal, - * just break out of the block but don't goto out yet. - */ - default: - break; - } - } - if ((heal_op == GF_SHD_OP_HEAL_ENABLE) || (heal_op == GF_SHD_OP_HEAL_DISABLE)) { key = volgen_get_shd_key(volinfo->type); @@ -906,7 +844,6 @@ glusterd_handle_heal_options_enable_disable(rpcsvc_request_t *req, dict_t *dict, if (ret) goto out; -set_volume: ret = glusterd_op_begin_synctask(req, GD_OP_SET_VOLUME, dict); out: @@ -2566,25 +2503,6 @@ glusterd_op_start_volume(dict_t *dict, char **op_errstr) if (ret) goto out; } - if (conf->op_version <= GD_OP_VERSION_3_7_6) { - /* - * Starting tier daemon on originator node will fail if - * at least one of the peer host brick for the volume. - * Because The bricks in the peer haven't started when you - * commit on originator node. - * Please upgrade to version greater than GD_OP_VERSION_3_7_6 - */ - if (volinfo->type == GF_CLUSTER_TYPE_TIER) { - if (volinfo->rebal.op != GD_OP_REMOVE_BRICK) { - glusterd_defrag_info_set(volinfo, dict, - GF_DEFRAG_CMD_START_TIER, - GF_DEFRAG_CMD_START, GD_OP_REBALANCE); - } - glusterd_restart_rebalance_for_volume(volinfo); - } - } else { - /* Starting tier daemon is moved into post validate phase */ - } svc = &(volinfo->gfproxyd.svc); ret = svc->manager(svc, volinfo, PROC_START_NO_WAIT); @@ -2623,16 +2541,6 @@ glusterd_stop_volume(glusterd_volinfo_t *volinfo) } } - /* call tier manager before the voluem status is set as stopped - * as tier uses that as a check in the manager - * */ - if (volinfo->type == GF_CLUSTER_TYPE_TIER) { - svc = &(volinfo->tierd.svc); - ret = svc->manager(svc, volinfo, PROC_START_NO_WAIT); - if (ret) - goto out; - } - glusterd_set_volume_status(volinfo, GLUSTERD_STATUS_STOPPED); ret = glusterd_store_volinfo(volinfo, GLUSTERD_VOLINFO_VER_AC_INCREMENT); |