[jboss-jira] [JBoss JIRA] Commented: (JGRP-951) Add in support for IPv6 to JGroups testsuite

Richard Achmatowicz (JIRA) jira-events at lists.jboss.org
Tue Apr 14 10:11:22 EDT 2009


    [ https://jira.jboss.org/jira/browse/JGRP-951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12462053#action_12462053 ] 

Richard Achmatowicz commented on JGRP-951:
------------------------------------------

Another issue with supporting IPv6 concerns IPv4 addresses embedded within the JGroups test cases. The following excerpt is taken from email correspondence with Bela:

> 3. Testsuite, hard-coded IPv4 addresses and IPv6
>
> The testsuite has many (many, many, many) IPv4 addresses embedded within it's tests, which do not make use of substitution with system properties jgroups.udp.mcast_addr, jgroups.udp.mcast_port and jgroups.bind_addr. So, for example, when running the testsuite with IPv6 addresses on the command line, we effectively run the testsuite using mixed IPv4 and IPv6 addresses. This is causing tests to fail and general wierdness.

I know, but we're moving away from them in 2.8, and will use UUIDs instead. Because we're using them directly, we cannot use var substitution

> Probably the only workable approach to deal with this is to go through and allow substitution for *all* of the hard-coded addresses, so they can be changed on the command line

Hmm... Instead of
Address my_addr=new IpAddress("192.168.1.5", 5000);
maybe we should use
Address my_addr=geRandomAddress(); // provided by superclass
?


> Add in support for IPv6 to JGroups testsuite
> --------------------------------------------
>
>                 Key: JGRP-951
>                 URL: https://jira.jboss.org/jira/browse/JGRP-951
>             Project: JGroups
>          Issue Type: Feature Request
>            Reporter: Richard Achmatowicz
>            Assignee: Richard Achmatowicz
>            Priority: Minor
>             Fix For: 2.4, 2.6, 2.7
>
>
> JGroups needs to support both IPv4 and IPv6. When running JGroups on a machine which has a dual IP stack, two system properties need to be set in order to specify preferences for one version of IP over the other:
> (excerpt from Sun notes) 
> 1. IPv6 stack is preferred by default, since on a dual-stack machine IPv6 socket can talk to both IPv4 and IPv6 peers.
> To change this, set -Djava.net.preferIPv4Stack=true  
> (NOTE: if we use java.net.preferIPv4Stack=true and use IPv6 addresses, we get a message  "exception while trying to create socket:java.net.SocketException: Protocol family unavailable")
> 2. By default, we would prefer IPv4 addresses over IPv6 addresses (i.e., when querying the name service (e.g., DNS service), we would return IPv4 addresses ahead of IPv6 addresses).
> There are two reasons for this choice:
>    1. There are some applications that expect an IPv4 address textual format, i.e. "%d.%d.%d.%d". Using an IPv4 address minimizes the surprises;
>    2. Using IPv4 address, we can use one call (with an IPv6 socket) to reach either a legacy IPv4-only service, or an IPv6 service (unless the IPv6 service is on a Ipv6 only node).
> To change this, set -Djava.net.preferIPv6Addresses=true 
> This issue concerns modifications to the JGroups testsuite to allow easy switching from IPv4 to IPv6 for testing purposes.
>  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list