From cee1b62d013cfb164f2a014919721c920c06514a Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Tue, 30 Oct 2012 10:23:20 +0530 Subject: glusterd: volume-sync shouldn't validate volume-id - volume sync would overwrite volume information on local node from the hostname supplied. This warning is provided to the user. - Also fixed a double free in volume-sync handler. Change-Id: Icc68d9d563fb50ca58d5880921f063692e1e6882 BUG: 865700 Signed-off-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.org/4188 Reviewed-by: Vijay Bellur Tested-by: Gluster Build System --- xlators/mgmt/glusterd/src/glusterd-handler.c | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index f33d2caeb..592fbbdb2 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -1137,7 +1137,6 @@ glusterd_handle_sync_volume (rpcsvc_request_t *req) dict_t *dict = NULL; gf_cli_rsp cli_rsp = {0.}; char msg[2048] = {0,}; - glusterd_volinfo_t *volinfo = NULL; char *volname = NULL; gf1_cli_sync_volume flags = 0; char *hostname = NULL; @@ -1194,30 +1193,6 @@ glusterd_handle_sync_volume (rpcsvc_request_t *req) goto out; } - if (!flags) { - ret = glusterd_volinfo_find (volname, &volinfo); - if (!ret) { - snprintf (msg, sizeof (msg), "please delete the " - "volume: %s before sync", volname); - ret = -1; - goto out; - } - - ret = dict_set_dynmstr (dict, "volname", volname); - if (ret) { - gf_log ("", GF_LOG_ERROR, "volume name set failed"); - snprintf (msg, sizeof (msg), "volume name set failed"); - goto out; - } - } else { - if (glusterd_volume_count_get ()) { - snprintf (msg, sizeof (msg), "please delete all the " - "volumes before full sync"); - ret = -1; - goto out; - } - } - ret = glusterd_op_begin (req, GD_OP_SYNC_VOLUME, dict); out: -- cgit