It looks like commit 3dc56cbd16b1074d7ca1a4fe4c5bf44400eb63ff ripped out IPv6 support from gluster. If I revert that commit (patch attached), what ill effects will I likely suffer? At least 'gluster peer probe' seems top work: # gluster peer status Number of Peers: 3 Hostname: fd46:12e3:2a54:0:1406:1010:4300:0 Uuid: 0707f4cf-981a-4405-8653-b946f1731a34 State: Peer in Cluster (Connected) Hostname: fd46:12e3:2a54:0:1406:1010:3900:0 Uuid: 5cf0f91d-1bcc-4585-89ea-af77d88c184b State: Peer in Cluster (Connected) Hostname: fd46:12e3:2a54:0:1405:1612:2300:0 Uuid: e8326d21-c5c4-422b-8509-a3142c05b2d9 State: Peer in Cluster (Connected) Regards Andes Blomdell -- Anders Blomdell Email: anders.blomdell@xxxxxxxxxxxxxx Department of Automatic Control Lund University Phone: +46 46 222 4625 P.O. Box 118 Fax: +46 46 138118 SE-221 00 Lund, Sweden
diff --git a/cli/src/cli.c b/cli/src/cli.c index 67f1ad2..1486480 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -573,7 +573,7 @@ cli_rpc_init (struct cli_state *state) goto out; ret = dict_set_str (options, "transport.address-family", - "inet"); + "inet/inet6"); if (ret) goto out; } else { diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index c24d410..0a5ad30 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -653,7 +653,7 @@ rpc_transport_inet_options_build (dict_t **options, const char *hostname, "failed to set remote-port with %d", port); goto out; } - ret = dict_set_str (dict, "transport.address-family", "inet"); + ret = dict_set_str (dict, "transport.address-family", "inet/inet6"); if (ret) { gf_log (THIS->name, GF_LOG_WARNING, "failed to set addr-family with inet"); diff --git a/rpc/rpc-transport/rdma/src/name.c b/rpc/rpc-transport/rdma/src/name.c index c57428a..2b36e7d 100644 --- a/rpc/rpc-transport/rdma/src/name.c +++ b/rpc/rpc-transport/rdma/src/name.c @@ -165,11 +165,13 @@ client_fill_address_family (rpc_transport_t *this, struct sockaddr *sockaddr) sockaddr->sa_family = AF_INET6; } else if (!strcasecmp (address_family, "inet-sdp")) { sockaddr->sa_family = AF_INET_SDP; + } else if (!strcasecmp (address_family, "inet/inet6") + || !strcasecmp (address_family, "inet6/inet")) { + sockaddr->sa_family = AF_UNSPEC; } else { gf_log (this->name, GF_LOG_ERROR, "unknown address-family (%s) specified", address_family); - sockaddr->sa_family = AF_UNSPEC; return -1; } } @@ -533,19 +535,21 @@ gf_rdma_server_get_local_sockaddr (rpc_transport_t *this, addr->sa_family = AF_INET_SDP; } else if (!strcasecmp (address_family, "unix")) { addr->sa_family = AF_UNIX; + } else if (!strcasecmp (address_family, "inet/inet6") + || !strcasecmp (address_family, "inet6/inet")) { + addr->sa_family = AF_UNSPEC; } else { gf_log (this->name, GF_LOG_ERROR, "unknown address family (%s) specified", address_family); - addr->sa_family = AF_UNSPEC; ret = -1; goto err; } } else { gf_log (this->name, GF_LOG_DEBUG, "option address-family not specified, defaulting " - "to inet"); - addr->sa_family = AF_INET; + "to inet/inet6"); + addr->sa_family = AF_UNSPEC; } switch (addr->sa_family) diff --git a/rpc/rpc-transport/socket/src/name.c b/rpc/rpc-transport/socket/src/name.c index 1647d5b..f1dda52 100644 --- a/rpc/rpc-transport/socket/src/name.c +++ b/rpc/rpc-transport/socket/src/name.c @@ -140,24 +140,24 @@ client_fill_address_family (rpc_transport_t *this, sa_family_t *sa_family) if (!(remote_host_data || connect_path_data) || (remote_host_data && connect_path_data)) { gf_log (this->name, GF_LOG_ERROR, - "transport.address-family not specified. " - "Could not guess default value from (remote-host:%s or " - "transport.unix.connect-path:%s) options", + "transport.address-family not specified and " + "not able to determine the " + "same from other options (remote-host:%s and " + "transport.unix.connect-path:%s)", data_to_str (remote_host_data), data_to_str (connect_path_data)); - *sa_family = AF_UNSPEC; goto out; } if (remote_host_data) { gf_log (this->name, GF_LOG_DEBUG, "address-family not specified, guessing it " - "to be inet from (remote-host: %s)", data_to_str (remote_host_data)); - *sa_family = AF_INET; + "to be inet/inet6"); + *sa_family = AF_UNSPEC; } else { gf_log (this->name, GF_LOG_DEBUG, "address-family not specified, guessing it " - "to be unix from (transport.unix.connect-path: %s)", data_to_str (connect_path_data)); + "to be unix"); *sa_family = AF_UNIX; } @@ -171,11 +171,13 @@ client_fill_address_family (rpc_transport_t *this, sa_family_t *sa_family) *sa_family = AF_INET6; } else if (!strcasecmp (address_family, "inet-sdp")) { *sa_family = AF_INET_SDP; + } else if (!strcasecmp (address_family, "inet/inet6") + || !strcasecmp (address_family, "inet6/inet")) { + *sa_family = AF_UNSPEC; } else { gf_log (this->name, GF_LOG_ERROR, "unknown address-family (%s) specified", address_family); - *sa_family = AF_UNSPEC; goto out; } } @@ -546,16 +548,18 @@ server_fill_address_family (rpc_transport_t *this, sa_family_t *sa_family) *sa_family = AF_INET_SDP; } else if (!strcasecmp (address_family, "unix")) { *sa_family = AF_UNIX; + } else if (!strcasecmp (address_family, "inet/inet6") + || !strcasecmp (address_family, "inet6/inet")) { + *sa_family = AF_UNSPEC; } else { gf_log (this->name, GF_LOG_ERROR, "unknown address family (%s) specified", address_family); - *sa_family = AF_UNSPEC; goto out; } } else { gf_log (this->name, GF_LOG_DEBUG, - "option address-family not specified, defaulting to inet"); - *sa_family = AF_INET; + "option address-family not specified, defaulting to inet/inet6"); + *sa_family = AF_UNSPEC; } ret = 0; diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index efbc531..7c126a6 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -3720,7 +3720,8 @@ struct volume_options options[] = { }, { .key = { "transport.address-family", "address-family" }, - .value = {"inet", "inet6", "unix", "inet-sdp" }, + .value = {"inet", "inet6", "inet/inet6", "inet6/inet", + "unix", "inet-sdp" }, .type = GF_OPTION_TYPE_STR },
_______________________________________________ Gluster-devel mailing list Gluster-devel@xxxxxxxxxxx http://supercolony.gluster.org/mailman/listinfo/gluster-devel