[
https://jira.jboss.org/jira/browse/JOPR-84?page=com.atlassian.jira.plugin...
]
Jay Shaughnessy commented on JOPR-84:
-------------------------------------
A related issue is, I think, the fact that it seems the left nav autogroups the resources,
displaying a count of (2) in the example above. But, when expanded will list only one
entry, not two with the same resource name.
This situation can occur in the typical use case of a new version of the Jopr Server being
installed into a new directory. The new server will be inventoried and the previous
server is already in inventory. The resource keys differ (because they are based on
install dir).
Make JBAS availability check take account of which actual instance is
responding on jnp url
-------------------------------------------------------------------------------------------
Key: JOPR-84
URL:
https://jira.jboss.org/jira/browse/JOPR-84
Project: Jopr
Issue Type: Feature Request
Components: Plugin - JBoss AS 4
Affects Versions: 2.1
Reporter: Charles Crouch
Fix For: 2.2
Use case:
I have 2 JBAS instances on a box. Sometimes i run one instance, sometimes I run another,
based on what application version I have deployed. Both instances have different install
paths but share ip and port settings (which is fine because they dont both run at the same
time)
Over time a JON agent running on this box will detect both instances so they can be added
to the inventory. The issue is that in JON both resources will show as available because
they both have the same jnp url.
The suggestion would be to make the getAvailabilityCheck be smarter so that the component
recognizes when its querying an instance that its not associated with, e.g. on
JBossASServerComponent
public AvailabilityType getAvailability() {
try {
EmsConnection connection = loadConnection();
EmsBean bean =
connection.getBean("jboss.system:type=ServerConfig");
File serverHomeViaJNP = (File)
bean.getAttribute("ServerHomeDir").refresh();
if (this.configPath.equals(serverHomeViaJNP))
return AvailabilityType.UP;
else
// a different server must have been started on our jnp url
return AvailabilityType.DOWN;
} catch (Exception e) {
return AvailabilityType.DOWN;
}
}
This is going to break existing resources (they will show red availability) where the
configPath no longer matches where the instance is actually installed, though
script/filesystem based operations (e.g. start, deploy apps) would already be broken for
these resources. Re-inventorying the resources should fix this.
--
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