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   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 847865 (view as bug list) Environment:
Last Closed: 2013-09-01 06:09:01 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 846400, 707223, 847865, 852891    

Description Armine Hovsepyan 2012-08-07 11:45:17 EDT
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:

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 11:56:05 EDT
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 12:51:37 EDT
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 17:28:19 EDT
master 83c2b30289f
Comment 4 Heiko W. Rupp 2012-08-14 09:41:03 EDT
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 09:52:45 EDT
Stefan reviewed the change.
Comment 6 Heiko W. Rupp 2012-08-27 16:52:06 EDT
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 06:09:01 EDT
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.