[jboss-jira] [JBoss JIRA] Commented: (JBAS-8710) HASingleton PreferredMasterElectionPolicy failing with IPv6 addresses
Richard Achmatowicz (JIRA)
jira-events at lists.jboss.org
Fri Dec 3 13:37:47 EST 2010
[ https://jira.jboss.org/browse/JBAS-8710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567586#comment-12567586 ]
Richard Achmatowicz commented on JBAS-8710:
-------------------------------------------
Two test cases relating to PreferredMasterElectionPolicy have been fixed:
1. PreferredMasterElectionPolicyTestCase was faling on testUsePreferredMasterViaAddress().
This test case tests what happens when we set up a set of cluster nodes {(localhost, 10000), (localhost, 10001), (localhost,10002)} and then try to set the preferred master using in IP address literal. localhost translates to either 127.0.0.1 or ::1 depending on the settings of java.net.preferIPv4Stack and java.net.preferIPv6Addresses. I made things simple and use 127.0.0.1:10002 if java.net.preferIPv4Stack=true and [::1]:10002 otherwise.
2. HASingletonElectionPolicyTestCase
This test was failng as the testcase deployment ha-electionpolicy-jboss-beans.xml was not deploying correctly, due to IPv6 addresses for preferredMaster attribute not being enclosed in square brackets. Fixed the XML descriptor by replacing <property name="preferredMaster">${node0.bind.address}:1099</property> with <property name="preferredMaster">${node0.bind.address.url}:1099</property>
> HASingleton PreferredMasterElectionPolicy failing with IPv6 addresses
> ---------------------------------------------------------------------
>
> Key: JBAS-8710
> URL: https://jira.jboss.org/browse/JBAS-8710
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Clustering, Test Suite
> Affects Versions: 6.0.0.CR1
> Reporter: Richard Achmatowicz
> Assignee: Richard Achmatowicz
> Fix For: 6.0.0.Final
>
>
> The bean org.jboss.ha.singleton.PreferredMasterElectionPolicy has an attribute preferredMaster which identified a process in a cluster which should be the master node in a clustered partition.
> The preferred master attriubute is specified in the form host:port.
> This format works fine for IPv4 addresses, but breaks down for IPv6 addresses unless the host part is surrounded with square brackets, according to rfc2732.
> There are two places which above class may break:
> (i) in setting the preferred master attribute
> (ii) in comparing ClusterNode instances using PreferredMasterElectionPolicy.find() to check if a given preferred master is in the current cluster.
>
>
>
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list