[jopr-issues] [JBoss JIRA] Commented: (JOPR-84) Make JBAS availability check take account of which actual instance is responding on jnp url

Jay Shaughnessy (JIRA) jira-events at lists.jboss.org
Tue Mar 3 13:36:27 EST 2009


    [ https://jira.jboss.org/jira/browse/JOPR-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12455254#action_12455254 ] 

Jay Shaughnessy commented on JOPR-84:
-------------------------------------

Additionally, if you want to uninventory the old server it's not easy to determine which one to select.

> 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

        



More information about the jopr-issues mailing list