Bug 1090130

Summary: DynaGroup expression evaluator is not strict when grouping by resource configuration property
Product: [JBoss] JBoss Operations Network Reporter: Heiko W. Rupp <hrupp>
Component: DocumentationAssignee: Jared MORGAN <jmorgan>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact: Jared MORGAN <jmorgan>
Priority: unspecified    
Version: JON 3.2CC: hrupp, lzoubek, mmurray, snegrea, zrhoads
Target Milestone: GAKeywords: Documentation
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1080909 Environment:
Last Closed: 2014-12-11 14:03:15 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: 1080909    
Bug Blocks: 1069544    

Description Heiko W. Rupp 2014-04-22 16:21:40 UTC
Matching is now strict. 'group' in 'groupby resource.resourceConfiguration[group]' will no longer match 'groups' or 'Dynagroup'.


+++ This bug was initially created as a clone of Bug #1080909 +++

Description of problem:


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

How reproducible: always


Steps to Reproduce:
1. have EAP6 in domain mode
3. create a dynagroup with following expression:

resource.type.plugin = JBossAS7
resource.type.name = Managed Server
groupby resource.resourceConfiguration[group]

4. hit recalculate

Actual results:

4 groups are generated, including groups full-sockets and full-ha-sockets. But those 2 does not come from 'group' config property value, but from 'server-group' config property

http://tinypic.com/view.php?pic=25gxizn&s=8#.UzKks3X221k


Expected results:

Groups based on 'server-group' property value must not be created.

Additional info:

--- Additional comment from Libor Zoubek on 2014-03-26 06:06:53 EDT ---

This is what comes out of dg expression

SELECT res.id FROM Resource res  JOIN res.resourceConfiguration conf, PropertySimple simple, PropertyDefinition simpleDef JOIN res.resourceType.resourceConfigurationDefinition confDef WHERE res.resourceType.plugin = :arg1  AND res.resourceType.name = :arg2  AND simple.name LIKE :arg3 ESCAPE '\'  AND simple.stringValue = :arg4  AND res.inventoryStatus = org.rhq.core.domain.resource.InventoryStatus.COMMITTED  AND simple.configuration = conf  AND simpleDef.configurationDefinition = confDef  AND simple.name = simpleDef.name  AND simpleDef.type != 'PASSWORD'


"simple.name LIKE :arg3" has to be changed to "simple.name = :arg3"

--- Additional comment from Heiko W. Rupp on 2014-03-26 06:15:24 EDT ---

Can we make sure that old existing expressions continue to work
E.g. by saying

resource.resourceConfiguration[group]  is a LIKE query
and
resource.resourceConfiguration["group"] is a = query

may also need an additional checkbox field in the wizzard popup to
allow to select exact / like matching.

Comment 1 Deon Ballard 2014-05-09 23:08:13 UTC
New feature. Assigning to John Ha.

Comment 3 Jared MORGAN 2014-10-02 23:14:47 UTC
--- Additional comment from Heiko W. Rupp on 2014-03-26 06:15:24 EDT ---

Can we make sure that old existing expressions continue to work
E.g. by saying

resource.resourceConfiguration[group]  is a LIKE query
and
resource.resourceConfiguration["group"] is a = query

may also need an additional checkbox field in the wizzard popup to
allow to select exact / like matching.

================================

This comments seems to be the impact on docs. I'm going to search for Dynagroup examples in our docs and see the impact.

I'll also need to check the UI and see if a check box has been added.

Comment 4 Libor Zoubek 2014-10-03 05:33:49 UTC
Hi Jared, 
please follow https://github.com/rhq-project/rhq/pull/16

In the Pull Request we decided to "just" fix a bug instead of introducing strict matching via double quote.