Bug 990466 - Dynagroup definitions - Expressions create empty groups
Dynagroup definitions - Expressions create empty groups
Status: NEW
Product: RHQ Project
Classification: Other
Component: Core Server, Resource Grouping (Show other bugs)
4.8
Unspecified Unspecified
unspecified Severity low (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-31 05:13 EDT by Filip Brychta
Modified: 2013-07-31 07:30 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Filip Brychta 2013-07-31 05:13:05 EDT
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 07:30:40 EDT
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.