Is there a '-g' (jboss.partition.name) option or how can I set the name of the cluster partition in EAP6
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Issue
- Is there an option to mention the cluster name in EAP 6? Like it is in EAP 5 using
run.sh -g $CLUSTER_NAME. - How can I add a name for a cluster to identify which cluster a node join?
- I see only a log-message
GMS: address=redhatlupus/cluster, cluster=cluster, physical address=127.0.0.1:55200. Is it possible to add a custom name?
Resolution
The cluster in EAP 6 is identified by the communication address (i.e. UDP multicast, -u <multicast-address> option). There is no need to have a partition name to divide different cluster.
However, you can customize the name of the cluster by changing the cache-container configuration as followed (example of standalone-full-ha.xml)
<subsystem xmlns="urn:jboss:domain:infinispan:1.3">
<cache-container name="cluster" aliases="ha-partition" default-cache="default">
<transport lock-timeout="60000" cluster="${jboss.partition.name:DefaultPartition}-cluster"/>
...
</cache-container>
<cache-container name="web" aliases="standard-session-cache" default-cache="repl" module="org.jboss.as.clustering.web.infinispan">
<transport lock-timeout="60000" cluster="${jboss.partition.name:DefaultPartition}-web"/>
...
</cache-container>
<cache-container name="ejb" aliases="sfsb sfsb-cache" default-cache="repl" module="org.jboss.as.clustering.ejb3.infinispan">
<transport lock-timeout="60000" cluster="${jboss.partition.name:DefaultPartition}-ejb"/>
...
</cache-container>
<cache-container name="hibernate" default-cache="local-query" module="org.jboss.as.jpa.hibernate:4">
<transport lock-timeout="60000" cluster="${jboss.partition.name:DefaultPartition}-hibernate"/>
...
</cache-container>
</subsystem>
Please change the name of all cache containers to full simulate the usage of jboss.partition.name of former versions.
The partition name might be configured with a expression as shown above or set with a fix property (i.e. ProductionCluster-).
For the standalone mode the expression jboss.partition.name can be overwritten by using the -Djboss.partition.name=MyPartition command line option at server start time.
If the domain mode is used, it is not possible to set the property for different servers by using the command line as the server JVMs are started by the controller. To reuse a profile for different clusters and customize the partition name the partition name definition within the profile uses the expression and this is customized by use of the system-properties element of the server-group. In this case each server-group might define its own cluster partition name. See example below.
<server-groups>
<server-group name="cluster1" profile="full-ha">
...
<system-properties>
<property name="jboss.partition.name" value="Cluster1"/>
</system-properties>
...
It is strongly recommended that in every case the cluster is separated by using a different communication address, this is for performance and safety reasons.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.