Bug 1123916

Summary: [AS7] app is not discovered if two versions are installed simultaneously
Product: [JBoss] JBoss Operations Network Reporter: Armine Hovsepyan <ahovsepy>
Component: Plugin -- JBoss EAP 6Assignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED NOTABUG QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: JON 3.3.0CC: ahovsepy, jshaughn, mfoley
Target Milestone: ---   
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-29 07:44:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1070326    
Attachments:
Description Flags
app_versions none

Description Armine Hovsepyan 2014-07-28 15:48:11 UTC
Created attachment 921812 [details]
app_versions

Description of problem:
[AS7] app is not discovered if two versions are installed simultaneously 

Version-Release number of selected component (if applicable):
 RHQ 4.13 master

How reproducible:
always

Steps to Reproduce:
1. install jon (rhqctl install --start) with rhq.as7.VersionedSubsystemDiscovery.pattern enabled
2. install 2 versions of the same app simultaneously to EAP6 
3.

Actual results:
No all is discovered 

Expected results:
either app with biggest version is discovered and active, or, meaningful log is logged telling how to get app discovered.


Additional info:
screen-shot attached

Comment 1 Jay Shaughnessy 2014-07-28 17:57:14 UTC

This is expected behavior.  We don't discover either versioned app if they both resolve to the same logical app.  This is to protect the user, really, because in this situation it would appear they intend to have two separate apps.

You should see in your agent log a WARN level message:

  "Discovered multiple resources with resource key [XYZ].  This is not allowed
   and they will be removed from discovery.  This is typically caused by having
   multiple versions of the same Deployment deployed.  To solve the problem
   either remove all but one version of the problem deployment or disable
   versioned deployment handling by setting
     -Drhq.as7.VersionedSubsystemDiscovery.pattern=disable
   for the agent."

As long as you see this message it's working as expected and is not a bug.

Comment 2 Armine Hovsepyan 2014-07-29 07:44:41 UTC
Lack of test case: I've had a expected result as app with biggest version is discovered.

Closing as not a bug.

Thank you.