Bug 990466 - Dynagroup definitions - Expressions create empty groups
Summary: Dynagroup definitions - Expressions create empty groups
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Core Server, Resource Grouping
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-31 09:13 UTC by Filip Brychta
Modified: 2022-03-31 04:28 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Filip Brychta 2013-07-31 09:13:05 UTC
Description of problem:
According to https://docs.jboss.org/author/display/RHQ/Group+Definitions - expressions should not create empty groups but they do on 4.9.0-SNAPSHOT
Build Number: 067cb8c

Version-Release number of selected component (if applicable):
Version: 4.9.0-SNAPSHOT
Build Number: 067cb8c

How reproducible:
Always

Steps to Reproduce:
1. create a new dynagroup definition with following expression: 'resource.type.name = nonExistingTypeName'
2. click on Save&Recalculate


Actual results:
Empty dynagroup is created.

Expected results:
Expressions will not create empty groups

Additional info:
The same behaviour for following expressions:
- memberOf = nonExistingGroup
- memberOf = emptyGroup

Comment 1 Jirka Kremser 2013-07-31 11:30:40 UTC
I would fix the documentation rather than the actual implementation. Sometimes it can be useful to have an empty managed group, take for instance dynagroup definition for all resources that are down "resource.availability = DOWN". 

One can have an CLI script checking the size of the resulting group, but if the group doesn't exist it is more difficult for him to do the same. I haven't looked to the code, but I can imagine the id for group is reassigned over and over again if the resulting group is empty => non-existent and subsequently non-empty => has to be created again.

To me it is more confusing to have multiple groups appearing and disappearing in the groups inventory than to have few empty groups that actually indicate some state of the system (there are no such resources that fulfill the condition).


Note You need to log in before you can comment on or make changes to this bug.