Bug 691476

Summary: Grouping fails due to Resource Key is too unique for the same resource across compatible parents
Product: [Other] RHQ Project Reporter: Larry O'Leary <loleary>
Component: Resource GroupingAssignee: Charles Crouch <ccrouch>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: high    
Version: 4.0.0CC: ccrouch, hbrock, hrupp, lkrejci, mazz, rsoares, skondkar
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
See Also: https://bugzilla.redhat.com/show_bug.cgi?id=601194
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-03 12:59:27 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 678340, 705059, 715334    
Attachments:
Description Flags
Screenshot_admin-console.war
none
Screenshot_run.sh none

Description Larry O'Leary 2011-03-28 12:28:21 EDT
When viewing compatible groups of resources and their children, the same resource will be displayed multiple times in the group view. 

For example, if you have a two node EAP 5 cluster:

   JBOSS_HOME=/opt/jboss/eap/jboss-eap-5.1/jbossas
   NODE1_CONF=Node1
   NODE2_CONF=Node2

The result is that the resource key for an EAR deployed to the cluster becomes too unique for the grouping to see that the resource is the same.

   etat.ear (Node1) Resource Key: vfsfile:/opt/jboss/eap/jboss-eap-5.1/jboss-as/server/Node1/deploy/etat.ear/
   etat.ear (Node2) Resource Key: vfsfile:/opt/jboss/eap/jboss-eap-5.1/jboss-as/server/Node2/deploy/etat.ear/


This issue can be seen by simply importing two JBoss EAP 5 instances into inventory which use two different configuration directories, adding them to a compatible group, and then looking at the admin-console.war application in the group view.
Comment 1 John Mazzitelli 2011-04-01 11:30:11 EDT
this is an issue with the jboss-5 plugin. its creating unique resource keys across all resources, not just across peer resources
Comment 2 Charles Crouch 2011-04-08 16:40:12 EDT
I bet this is a problem for lots of other resources types too. We will need to check those and assess the impact of fixing those other occurrences.
Comment 3 Rafael Soares (Tuelho) 2011-04-27 18:48:21 EDT
Would be interesting consider the scenario shown in this topic: http://community.jboss.org/message/602370
Comment 4 Ian Springer 2011-05-17 12:38:12 EDT
I found two sets of ResourceTypes affected by this problem:

1) AS5 plugin deployments (EARs, WARs, EJB-JARs, etc.)
2) AS4 and AS5 plugin Scripts

With [master 25e909e], I upgraded the keys, using the new resource upgrade facet, as follows:

1) old key format: "vfszip:/C:/opt/jboss-6.0.0.Final/server/default/deploy/http-invoker.sar/invoker.war/" (the ManagedDeployment name)
   new key format: "{default}http-invoker.sar/invoker.war" (where "default" is the profile the deployment is deployed to and the rest is the hierarchy of the managed deployment, using the simple/base names for each of the ancestors

2) old key format: "/opt/jboss/bin/run.sh" (absolute path of script) 
   new key format: "run.sh" if script is under server bin dir, or absolute path otherwise
Comment 5 Larry O'Leary 2011-05-17 13:51:20 EDT
The new key format will not address 1) as described by this bug.

   etat.ear (Node1) Resource Key:
vfsfile:/opt/jboss/eap/jboss-eap-5.1/jboss-as/server/Node1/deploy/etat.ear/
   etat.ear (Node2) Resource Key:
vfsfile:/opt/jboss/eap/jboss-eap-5.1/jboss-as/server/Node2/deploy/etat.ear/



As we can see, the configuration name here is Node1 and Node2. So, this cluster would still uniquely identify the two etat.ear files as separate from a group perspective.

Not sure that this can easily be addressed though unless we look at partition names and group addresses as part of the grouping mechanism. 

This same issue would also apply in the following scenario:

   etat.ear (MyServer) Resource Key:
vfsfile:/opt/jboss/eap/jboss-eap-5.1/jboss-as/server/MyServer/deploy/etat.ear/
   etat.ear (MyServer) Resource Key:
vfsfile:/opt/jboss/eap/jboss-eap-5.1/jboss-as/server/MyServer/customer-apps/etat.ear/
Comment 6 Ian Springer 2011-05-17 15:39:34 EDT
Note, the management profile name used in the new resource key format is not the same thing as the configuration set name (e.g. Node1, Node2). I think the profile name would typically be the same for two nodes in a cluster, so I think the new format will address your use case.
Comment 7 Sunil Kondkar 2011-05-26 05:05:21 EDT
Verified on build101 (Version: 4.1.0-SNAPSHOT Build Number: 712d0e1)

Insalled and imported two JBoss EAP 5 instances into inventory which uses two different configuration directories(default and all).
Created a compatible group of these two instances. Navigated to the Inventory->members tab of admin-console.war application in the group view. Added a 'key' column on the page.

The key for both the resources is displayed as per the new format:  {default}admin-console.war

The key for the script is displayed as as per the new format:  run.sh

Please refer the attached screenshots.

Marking as verified.
Comment 8 Sunil Kondkar 2011-05-26 05:07:21 EDT
Created attachment 501026 [details]
Screenshot_admin-console.war
Comment 9 Sunil Kondkar 2011-05-26 05:08:38 EDT
Created attachment 501027 [details]
Screenshot_run.sh
Comment 11 Heiko W. Rupp 2013-09-03 12:59:27 EDT
Bulk closing of old issues that are in VERIFIED state.
Comment 12 Lukas Krejci 2013-11-15 08:50:25 EST
*** Bug 601194 has been marked as a duplicate of this bug. ***