summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2016-04-16 07:46:40 +0530
committerKaushal M <kaushal@redhat.com>2016-04-16 07:48:23 +0530
commit95cd42ebda087343ecb7267fa1fd5ac129c756e1 (patch)
tree43a1d3ebdd87a3ebfa860aba339d288e72e39d6e /xlators
parent1c62ca12df86eedf130de679ac99638a9d0ad82d (diff)
Revert "glusterd: Bug fixes for IPv6 support"
This reverts commit b33f3c95ec9c8112e6677e09cea05c4c462040d0. This commit exposes some issues with management encryption that prevents GlusterFS from operating properly. This will be added again once problems with management encryption are fixed.
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-replace-brick.c15
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c38
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c42
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c6
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in3
-rwxr-xr-xxlators/mount/fuse/utils/mount_glusterfs.in3
6 files changed, 4 insertions, 103 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
index 3b8483847e4..b1266aa032e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
+++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
@@ -194,7 +194,6 @@ glusterd_op_stage_replace_brick (dict_t *dict, char **op_errstr,
xlator_t *this = NULL;
gf_boolean_t is_force = _gf_false;
gsync_status_param_t param = {0,};
- char *c = NULL;
this = THIS;
GF_ASSERT (this);
@@ -346,18 +345,8 @@ glusterd_op_stage_replace_brick (dict_t *dict, char **op_errstr,
GD_MSG_NO_MEMORY, "Memory allocation failed");
goto out;
}
-
- /*
- * IPv4 address contains '.' and ipv6 addresses contains ':'
- * So finding the last occurance of ':' to
- * mark the start of brick path
- */
- c = strrchr(dup_dstbrick, ':');
- if (c != NULL) {
- c[0] = '\0';
- host = dup_dstbrick;
- path = c++;
- }
+ host = strtok_r (dup_dstbrick, ":", &savetok);
+ path = strtok_r (NULL, ":", &savetok);
if (!host || !path) {
gf_msg (this->name, GF_LOG_ERROR, 0,
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 4db3538162f..086f053d9c3 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -2086,7 +2086,6 @@ brick_graph_add_server (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
char key[1024] = {0};
char *ssl_user = NULL;
char *value = NULL;
- char *address_family_data = NULL;
if (!graph || !volinfo || !set_dict || !brickinfo)
goto out;
@@ -2123,17 +2122,6 @@ brick_graph_add_server (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
RPC_SET_OPT(xl, SSL_DH_PARAM_OPT, "ssl-dh-param", return -1);
RPC_SET_OPT(xl, SSL_EC_CURVE_OPT, "ssl-ec-curve", return -1);
- if (dict_get_str (volinfo->dict, "transport.address-family",
- &address_family_data) == 0) {
- ret = xlator_set_option (xl, "transport.address-family",
- address_family_data);
- if (ret) {
- gf_log ("glusterd", GF_LOG_WARNING,
- "failed to set transport.address-family");
- return -1;
- }
- }
-
if (username) {
memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "auth.login.%s.allow",
@@ -2181,7 +2169,6 @@ brick_graph_add_pump (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
char *password = NULL;
char *ptranst = NULL;
char *value = NULL;
- char *address_family_data = NULL;
if (!graph || !volinfo || !set_dict)
@@ -2243,18 +2230,6 @@ brick_graph_add_pump (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
if (ret)
return -1;
- if (dict_get_str (volinfo->dict, "transport.address-family",
- &address_family_data) == 0) {
- ret = xlator_set_option (rbxl,
- "transport.address-family",
- address_family_data);
- if (ret) {
- gf_log ("glusterd", GF_LOG_WARNING,
- "failed to set transport.address-family");
- return -1;
- }
- }
-
xl = volgen_graph_add_nolink (graph, "cluster/pump", "%s-pump",
volinfo->volname);
if (!xl)
@@ -2731,7 +2706,6 @@ volgen_graph_build_client (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
char *ssl_str = NULL;
gf_boolean_t ssl_bool = _gf_false;
char *value = NULL;
- char *address_family_data = NULL;
GF_ASSERT (graph);
GF_ASSERT (subvol);
@@ -2761,18 +2735,6 @@ volgen_graph_build_client (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
if (ret)
goto err;
- if (dict_get_str (volinfo->dict, "transport.address-family",
- &address_family_data) == 0) {
- ret = xlator_set_option (xl,
- "transport.address-family",
- address_family_data);
- if (ret) {
- gf_log ("glusterd", GF_LOG_WARNING,
- "failed to set transport.address-family");
- goto err;
- }
- }
-
ret = dict_get_uint32 (set_dict, "trusted-client",
&client_type);
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index 661668084d5..24a30ea7ec8 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -285,7 +285,6 @@ __glusterd_handle_create_volume (rpcsvc_request_t *req)
xlator_t *this = NULL;
char *free_ptr = NULL;
char *trans_type = NULL;
- char *address_family_str = NULL;
uuid_t volume_id = {0,};
uuid_t tmp_uuid = {0};
int32_t type = 0;
@@ -366,8 +365,6 @@ __glusterd_handle_create_volume (rpcsvc_request_t *req)
goto out;
}
-
-
ret = dict_get_str (dict, "transport", &trans_type);
if (ret) {
snprintf (err_str, sizeof (err_str), "Unable to get "
@@ -376,30 +373,6 @@ __glusterd_handle_create_volume (rpcsvc_request_t *req)
GD_MSG_DICT_GET_FAILED, "%s", err_str);
goto out;
}
-
- ret = dict_get_str (this->options, "transport.address-family",
- &address_family_str);
-
- if (!ret) {
- ret = dict_set_dynstr_with_alloc (dict,
- "transport.address-family",
- address_family_str);
- if (ret) {
- gf_log (this->name, GF_LOG_ERROR,
- "failed to set transport.address-family");
- goto out;
- }
- } else if (!strcmp(trans_type, "tcp")) {
- /* Setting default as inet for trans_type tcp */
- ret = dict_set_dynstr_with_alloc (dict,
- "transport.address-family",
- "inet");
- if (ret) {
- gf_log (this->name, GF_LOG_ERROR,
- "failed to set transport.address-family");
- goto out;
- }
- }
ret = dict_get_str (dict, "bricks", &bricks);
if (ret) {
snprintf (err_str, sizeof (err_str), "Unable to get bricks for "
@@ -2117,7 +2090,6 @@ glusterd_op_create_volume (dict_t *dict, char **op_errstr)
char msg[1024] __attribute__((unused)) = {0, };
char *brick_mount_dir = NULL;
char key[PATH_MAX] = "";
- char *address_family_str = NULL;
this = THIS;
GF_ASSERT (this);
@@ -2390,20 +2362,6 @@ glusterd_op_create_volume (dict_t *dict, char **op_errstr)
goto out;
}
- ret = dict_get_str (dict, "transport.address-family",
- &address_family_str);
-
- if (!ret) {
- ret = dict_set_dynstr_with_alloc(volinfo->dict,
- "transport.address-family", address_family_str);
- if (ret) {
- gf_log (this->name, GF_LOG_ERROR,
- "Failed to set transport.address-family for %s",
- volinfo->volname);
- goto out;
- }
- }
-
gd_update_volume_op_versions (volinfo);
volinfo->caps = caps;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 59b31e26a9f..c9b80030765 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -1642,12 +1642,6 @@ struct volopt_map_entry glusterd_volopt_map[] = {
.option = "!ssl-ec-curve",
.op_version = GD_OP_VERSION_3_7_4,
},
- { .key = "transport.address-family",
- .voltype = "protocol/server",
- .option = "!address-family",
- .op_version = GD_OP_VERSION_3_7_4,
- .type = NO_DOC,
- },
/* Performance xlators enable/disbable options */
{ .key = "performance.write-behind",
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index b0af1af7e9d..7f314da69ec 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -595,8 +595,7 @@ main ()
fi
[ -r "$volfile_loc" ] || {
- # '%' included to support ipv6 link local addresses
- server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:%.\-]*\):.*/\1/p');
+ server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:.\-]*\):.*/\1/p');
volume_str=$(echo "$volfile_loc" | sed -n 's/.*:\([^ ]*\).*/\1/p');
[ -n "$volume_str" ] && {
volume_id="$volume_str";
diff --git a/xlators/mount/fuse/utils/mount_glusterfs.in b/xlators/mount/fuse/utils/mount_glusterfs.in
index eca84557e87..3d58c29e0cf 100755
--- a/xlators/mount/fuse/utils/mount_glusterfs.in
+++ b/xlators/mount/fuse/utils/mount_glusterfs.in
@@ -501,8 +501,7 @@ main ()
done
[ -r "$volfile_loc" ] || {
- # '%' included to support ipv6 link local addresses
- server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:%.\-]*\):.*/\1/p');
+ server_ip=$(echo "$volfile_loc" | sed -n 's/\([a-zA-Z0-9:.\-]*\):.*/\1/p');
volume_str=$(echo "$volfile_loc" | sed -n 's/.*:\([^ ]*\).*/\1/p');
[ -n "$volume_str" ] && {
volume_id="$volume_str";