[
https://issues.jboss.org/browse/ISPN-7326?page=com.atlassian.jira.plugin....
]
Galder Zamarreño edited comment on ISPN-7326 at 1/9/17 8:18 AM:
----------------------------------------------------------------
After careful investigation, it turns out that {{remote-site}}'s name is resolve
correctly thanks to the fact that the name is only resolved when the node is started up,
e.g. from StackAddHandler.java
{code}
String siteName = RelayResourceDefinition.SITE.resolveModelAttribute(context,
relay).asString();
RelayConfigurationBuilder relayBuilder = builder.setRelay(siteName);
{code}
On the other hand, {{backup}}'s site attribute and {{remote-site}}'s name
attributes are not resolved.
So, similar pattern should be applied here.
However, a problem present for {{backup}}'s site and {{remote-site}}'s name
attributes is that their names seem to form part of addresses, so there's no
attributes for them per-se and since they are part of addresses, the resolution might need
to happen when XML is read but that would not work since it's the host controller that
does that?
was (Author: galder.zamarreno):
After careful investigation, it turns out that {{remote-site}}'s name is resolve
correctly thanks to the fact that the name is only resolved when the node is started up,
e.g. from StackAddHandler.java
{code}
String siteName = RelayResourceDefinition.SITE.resolveModelAttribute(context,
relay).asString();
RelayConfigurationBuilder relayBuilder = builder.setRelay(siteName);
{code}
On the other hand, {{backup}}'s site attribute and {{remote-site}}'s name
attributes are not resolved.
So, similar pattern should be applied here.
However, a problem present for {{backup}}'s site and {{remote-site}}'s name
attributes is that their names seem to form part of addresses, so there's no
attributes for them per-se and since they are part of addresses, the resolution might need
to happen when XML is read but that would not work since it's the host controller that
does that?
Enable domain sites to be created from a single profile
-------------------------------------------------------
Key: ISPN-7326
URL:
https://issues.jboss.org/browse/ISPN-7326
Project: Infinispan
Issue Type: Enhancement
Components: Server
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
In domain mode, it should be possible to start two nodes, each belonging to a different
site and get them to join the inter-site cluster providing a single profile.
To be able to do that, the following needs to happen:
* A cache's backup site name needs to be able to be defined via a system property,
e.g.
{code}
<backups>
<backup site="${test.site.local.name:NA}"
strategy="SYNC"/>
</backups>
{code}
* A jgroup stack's relay remote site name needs to be able to be defined via a system
property, e.g.
{code}
<relay site="${test.site.local.name:NA}">
<remote-site name="${test.site.remote.name:NA}"
channel="xsite"/>
</relay>
{code}
With these changes, it should be possible to define a single profile, and then override
site local and remote names via system properties, e.g.
{code}
<server-group name="site-earth" profile="clustered">
<jvm name="default">
<heap size="64m" max-size="512m"/>
<jvm-options>
<option value="-Djgroups.join_timeout=1000"/>
<option
value="-Djboss.default.multicast.address=234.99.74.14"/>
<option value="-Dtest.site.local.name=EARTH"/>
<option value="-Dtest.site.remote.name=MOON"/>
</jvm-options>
</jvm>
<socket-binding-group ref="xsite-sockets"/>
</server-group>
<server-group name="site-moon" profile="clustered">
<jvm name="default">
<heap size="64m" max-size="512m"/>
<jvm-options>
<option value="-Djgroups.join_timeout=1000"/>
<option
value="-Djboss.default.multicast.address=234.99.74.24"/>
<option value="-Dtest.site.local.name=MOON"/>
<option value="-Dtest.site.remote.name=EARTH"/>
</jvm-options>
</jvm>
<socket-binding-group ref="xsite-sockets"/>
</server-group>
{code}
Right now no system property substitution happens for the elements above and hence
it's not possible to achieve this with a single profile. Instead, profiles need to be
duplicated making it hard to maintain.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)