Bug 910836 - peer probe over ipv6 on ipv4/ipv6 network fails.
Summary: peer probe over ipv6 on ipv4/ipv6 network fails.
Keywords:
Status: CLOSED EOL
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: 3.5.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Kaushal
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-13 16:48 UTC by lyon
Modified: 2016-06-17 16:24 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-17 16:24:25 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description lyon 2013-02-13 16:48:30 UTC
Description of problem:
When gluster attempts to peer probe on a machine that has both ipv6 and ipv4 global addresses it defaults to ipv4. This makes it impossible to peer probe (or anything else for that matter) over the ipv6 address.

# gluster peer probe 2002:c0a8:210b::1
Unsuccessful

# Gluster log says:
[2013-02-08 17:59:15.000084] I [glusterd-handler.c:2245:glusterd_probe_begin] 0-glusterd: Unable to find peerinfo for host: 2002:c0a8:210b::1 (24007)
[2013-02-08 17:59:15.000317] I [rpc-clnt.c:968:rpc_clnt_connection_init] 0-management: setting frame-timeout to 600
[2013-02-08 17:59:15.000540] E [common-utils.c:125:gf_resolve_ip6] 0-resolver: getaddrinfo failed (Address family for hostname not supported)
[2013-02-08 17:59:15.000571] E [name.c:243:af_inet_client_get_remote_sockaddr] 0-management: DNS resolution failed on host 2002:c0a8:210b::1

the error message 'Address family for hostname not supported'
comes from getaddrinfo only when you pass it a hint to saying AF_INET when your passing an ipv6 address, or if you send the hint AF_INET6 and you pass it a ipv4 address. We confirmed with a small test (https://gist.github.com/0x783czar/4772457).

If this is intended how do we 

Version-Release number of selected component (if applicable):
We attempted this on versions 3.2.4, 3.3.1, and 3.4.0-beta. Also attempted on centos and ubuntu machines.

How reproducible:
create machines, both having ipv4 addresses and ipv6. install gluster and try peer probing over ipv6. 


Steps to Reproduce:
1. create 2 machines. on an ipv4 network.

2. set up a 6to4 ipv6 address
This is what we use to do it:
sudo modprobe sit
sudo ip tunnel add sit1 remote any local 192.168.33.10
sudo ip link set sit1 up
sudo ip -6 addr add $(printf \"2002:%02x%02x:%02x%02x::1\" \`echo 192.168.33.10 | tr \".\" \" \"\`)/16 dev sit1
where 192.168.33.10 is the machine your on.

3. the install gluster and attempt to use the set1 device to peer probe
  
Actual results:
[2013-02-08 17:59:15.000084] I [glusterd-handler.c:2245:glusterd_probe_begin] 0-glusterd: Unable to find peerinfo for host: 2002:c0a8:210b::1 (24007)
[2013-02-08 17:59:15.000317] I [rpc-clnt.c:968:rpc_clnt_connection_init] 0-management: setting frame-timeout to 600
[2013-02-08 17:59:15.000540] E [common-utils.c:125:gf_resolve_ip6] 0-resolver: getaddrinfo failed (Address family for hostname not supported)
[2013-02-08 17:59:15.000571] E [name.c:243:af_inet_client_get_remote_sockaddr] 0-management: DNS resolution failed on host 2002:c0a8:210b::1

Comment 1 Amar Tumballi 2013-02-14 09:34:50 UTC
can you try adding "option socket.address-family inet6" in glusterd.vol ? (/etc/glusterfs/glusterd.vol) and then see if it works for peer probe etc. (This has to be done in all nodes where glusterd is running.

Thats just a quick work around I can recommend, if it doesn't work, I should take it as an Feature Enhancement and start looking into issues.

Comment 2 lyon 2013-02-14 15:56:59 UTC
I forgot to mention 'option socket.address-family inet6' was already set. Neither deamon would listen on ipv6 without it.

So yes that was in the configuration. We discovered that no matter what the address-family setting was when we tried peer probing it would do a getaddrinfo() on ipv4 and the function would fail.

Just to test we applied a patch that forced ipv6 (https://gist.github.com/notxarb/8dedd34b420e78a353e8) and it was able to peer probe. This is not ideal, my team and I would like the address-family effect what address family we would be peer probing on as well as what address family my local deamon would be listening on.

Comment 3 Niels de Vos 2014-11-27 14:54:09 UTC
The version that this bug has been reported against, does not get any updates from the Gluster Community anymore. Please verify if this report is still valid against a current (3.4, 3.5 or 3.6) release and update the version, or close this bug.

If there has been no update before 9 December 2014, this bug will get automatocally closed.

Comment 4 Birger Brunswiek 2014-11-28 22:21:04 UTC
Problem still exists in 3.5.

Comment 6 Niels de Vos 2016-06-17 16:24:25 UTC
This bug is getting closed because the 3.5 is marked End-Of-Life. There will be no further updates to this version. Please open a new bug against a version that still receives bugfixes if you are still facing this issue in a more current release.


Note You need to log in before you can comment on or make changes to this bug.