Bug 1018179

Summary: Let jboss-as-7 plug-in discover Infinispan subsystem in Infinispan server also using community plug-in
Product: [JBoss] JBoss Operations Network Reporter: Tomas Sykora <tsykora>
Component: Plugin -- JDGAssignee: Simeon Pinder <spinder>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: JON 3.2CC: ccrouch, gsheldon, mharvey, myarboro, spinder, ttarrant
Target Milestone: ER07   
Target Release: JON 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-02 20:42:54 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: 1017654    

Description Tomas Sykora 2013-10-11 11:34:37 UTC
Hello guys,

I hope I've found what exactly cause our recent (JDG) problems with discovering Infinispan subsystem under Infinispan server.

Our plug-in renamed since JDG 6.1 GA from "JDG" to more community related "InfinispanServer".

However, looking into jboss-as-7 plug-in (we are based on this, of course) here:

https://git.fedorahosted.org/cgit/rhq/rhq.git/tree/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/SubsystemDiscovery.java

Line 216:
boolean ourPluginTypeIsJdg = ourType.getPlugin().equals("JDG"); 

only "JDG" name is taking into account. So when plug-in is named "InfinispanServer" ourPluginTypeIsJdg is set to false, and output of a method shouldSkipEntryWrtIspn() is true and Infinispan subsystem is skipped.

Would it be possible to take "InfinispanServer" plug-in name into account as well?

Hopefully: boolean ourPluginTypeIsJdg = (ourType.getPlugin().equals("JDG") || (ourType.getPlugin().equals("InfinispanServer")); should be enough. 

Or maybe some "more-complex" pattern for deciding about Infinispan/JDG plug-in names?

Thank you very much!
Tomas

Comment 1 Tomas Sykora 2013-11-07 13:41:15 UTC
Is anyone looking into it? 
If I didn't miss something, it was not fixed in target ER05 release.

Comment 2 Simeon Pinder 2013-11-11 15:56:14 UTC
This is fixed with commit : 7af64a34c1c03f to release branch and also cherrypicked to master as well.

@Tomas, the suggested patch seems fine. In future these types of changes should be able to be handled by new plugin callback functionality described here without needing explicit changes in the as7/eap plugin : https://docs.jboss.org/author/display/RHQ/Discovery+Callbacks

Moving this to MODIFIED for testing with next brew build.

Comment 3 Tomas Sykora 2013-11-11 16:05:11 UTC
Awesome! 
Thank you Simeon!
I will play with it immediately once I put my hands on fresh ER06.

Comment 4 Simeon Pinder 2013-11-19 15:47:53 UTC
Moving to ON_QA as available for testing with new brew build.

Comment 5 Simeon Pinder 2013-11-22 05:13:29 UTC
Mass moving all of these from ER6 to target milestone ER07 since the ER6 build was bad and QE was halted for the same reason.