Bug 846385

Summary: contradiction of eap and jdg plugins
Product: [Other] RHQ Project Reporter: Armine Hovsepyan <ahovsepy>
Component: PluginsAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: high    
Version: 4.5CC: hrupp, mfoley, snegrea
Target Milestone: ---   
Target Release: RHQ 4.5.0   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 847865 (view as bug list) Environment:
Last Closed: 2013-09-01 10:09:01 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: 846400, 707223, 847865, 852891    

Description Armine Hovsepyan 2012-08-07 15:45:17 UTC
Description of problem:
When both jdg and eap plugins are installed, eap server is started and inventoried, there are some problems with the eap plugin functionality - it is not possible to create infinispan cache resources, it is not possible to edit infinispan resources, 

Version-Release number of selected component (if applicable):
JON 3.1.1 ER1

How reproducible:
always

Steps to Reproduce:
1.Install jon with both jdg and eap plugins 
2. start eap server
3. start jon
4. inventory eap server
5. try to edit add infinispan cache resources
  
Actual results:
it is not possible to edit, add infinispan cache resources

Expected results:
it is possible to add / edit infinispan cache resources

Additional info:

Comment 1 Stefan Negrea 2012-08-09 15:56:05 UTC
The JDG plugin uses the same subsystem discovery class as the AS7 plugin. The Cache resource is present in the two plugins (basically it's the same subsystem to be discovered) and is discoverable by both plugins.  In this case it just happens that the resource gets discovered through JDG version of the Cache descriptor. 

The same problem would occur if a JDG server is inventoried. Two resources attempting to discover the same subsystem. The result is somewhat unpredictable.


A patch would need to fix both cases:
1) The AS7 Cache resource should be discovered/activated only for EAP6 resources but not for JDG resources.
2) The JDG Cache resource should be discovered/activated only for JDG resources but not EAP6 resources.

Fixes need to be added to both plugins and in this case they need to be very specific to testing for JDG vs EAP6 parent resources.

Comment 2 Heiko W. Rupp 2012-08-10 16:51:37 UTC
Ok, so we see both Infinispan types in the subsystem discovery.
So "only the check is wrong"

Comment 3 Heiko W. Rupp 2012-08-13 21:28:19 UTC
master 83c2b30289f

Comment 4 Heiko W. Rupp 2012-08-14 13:41:03 UTC
Tested with jdg plugin + eap plugin enabled
- eap standalone found the eap types
- eap domain found the eap types (no duplicate infinispan resources found)
- jdg standalone found the jdg types
- jdg domain does not exist.

Comment 5 Heiko W. Rupp 2012-08-14 13:52:45 UTC
Stefan reviewed the change.

Comment 6 Heiko W. Rupp 2012-08-27 20:52:06 UTC
So the situation is as follows:

The JDG plugin and the as7 plugin both have a type called "Infinispan".

The type as7/Inifinispan has slightly different behavior than the jdg/Infinispan type (see below).
My comments 2-5 were about that the types were not always detected correctly and the JDG version was detected for EAP serves. This especially applied to the type=Cache resources.

As Cache/JDG is read-only and no children were created, you were seeing this on EAP as described in the original description.

My fixes made sure that the as7-types are used for EAP and the JDG types for JDG.
So on EAP you will be able to create new cache resources on EAP now, while on JDG this will not be possible (as the plugin does not allow it).

Comment 7 Heiko W. Rupp 2013-09-01 10:09:01 UTC
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.