[
https://jira.jboss.org/jira/browse/JGRP-951?page=com.atlassian.jira.plugi...
]
Richard Achmatowicz commented on JGRP-951:
------------------------------------------
My initial ideas were to do the following:
- in build.xml, to the ant macro runtests, add in system properties for both
-Djava.net.preferIPv4Stack and -Djava.net.preferIPv6Addresses
- introduce an ant property jgroups.useIPv6 into build.properties which allows the user to
indicate a preference for using IPv4 or IPv6 when running the testsuite
- include a check in build.xml which sets -Djava.net.preferIPv4Stack and
-Djava.net.preferIPv6Addresses based on the value of jgroups.useIPv6:
<!-- properties to determine IP version used -->
<condition property="java.net.preferIPv4Stack" value="true"
else="false">
<isfalse value="${jgroups.useIPv6}"/>
</condition>
<condition property="java.net.preferIPv6Addresses" value="true"
else="false">
<istrue value="${jgroups.useIPv6}"/>
</condition>
This seems ok, as these elements apply only to the JGroups testsuite, and would allow
running tests against either set set of IPv4 addresses, or a set of IPv6 addresses, but
not a mix of the two.
The other alternative is to allow setting independently the values of
-Djava.net.preferIPv4Stack and -Djava.net.preferIPv6Addresses in build.properties, but
this would only be needed for a mix of hosts.
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