2 Replies Latest reply on Jun 21, 2013 12:35 PM by Wolf-Dieter Fink

    Are server names across hosts in a cluster required to be unique?

    Rhys E Newbie

      Hi

       

      We have been using JBoss AS 7.1.2 in domain mode and recently encountered an issue because org.jboss.as.controller.client.helpers.domain.DomainClient.getServerStatuses() was not returning all of the servers.

       

      Eventually we tracked it down – we had servers with the same name but on different hosts.  We assumed this would be ok but the implementation of the equals method for the ServerIdentity class used as the key in the map returned by the above method only takes account of the server name and not the host name.  See https://github.com/wildfly/wildfly/blob/master/controller-client/src/main/java/org/jboss/as/controller/client/helpers/domain/ServerIdentity.java. This behaviour seems intentional given the javadoc for the equals method in the above class.

       

      Confusingly there is another class called ServerIdentity (https://github.com/wildfly/wildfly/blob/master/host-controller/src/main/java/org/jboss/as/domain/controller/ServerIdentity.java) which I am guessing is used on the server side.  This class does use both server name and host name in the equals implementation.

       

      I have a couple of questions:

      • Is it required that server names are unique across a cluster?  And if so is this enforced anywhere?
      • If not, should the implementation of the above equals method be changed to include the host name?

       

      Regards

      Rhys