Bug 608898

Summary: Calculating a modified dynagroup never seems to come back in a timely manner
Product: [Other] RHQ Project Reporter: Corey Welton <cwelton>
Component: Resource GroupingAssignee: Joseph Marques <jmarques>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.4CC: jmarques
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-12 16:47:43 UTC Type: ---
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: 535671, 593121    

Description Corey Welton 2010-06-28 20:52:34 UTC
Description of problem:
Discovered while testing bug 535671

Creating a dynagroup, calculating the group and changing in can result in things failing, or taking A Very Long Time to calculate, even for small numbers.


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


How reproducible:
Not sure yet...

Steps to Reproduce:

Prerequisite:  Assure you have one AS server in inventory.  

1. Create a dynagroup:
resource.type.plugin = JBossAS
resource.type.name = JBossAS Server
2. After created, click "Calculate Groups" button.
3. Create a group alert.  For this one, I chose where active threads > 0
4. Edit this dynagroup to be:
resource.type.name.contains = VM
5. Save
6. Attempt to "Calculate Groups" once again.

  
Actual results:
Very long delay, if it ever comes back.  


Expected results:

With one server it ought to be pretty fast.  I encountered this with "recursive" checked and without.


Additional info:

Comment 1 Corey Welton 2010-06-28 20:54:19 UTC
Additional note:  encountered this on a fresh db after attempting on an upgraded db.

Comment 2 Joseph Marques 2010-06-29 16:50:43 UTC
commit 0beacaaa68b779b9677851568ed2e718b5c18d0d
Author: Joseph Marques <joseph>
Date:   Tue Jun 29 12:44:44 2010 -0400

BZ-608898: prevent deadlock during dynagroup recalculation
    
* first add/remove resources to the recalculated group, commit that work
* then reset the ResourceType on the group as necessary, based off of new membership

-----

commit eaf523492da7127850506e4f5919b4b9ce253e24
Author: Joseph Marques <joseph>
Date:   Tue Jun 29 12:43:15 2010 -0400

BZ-608898: when setting the ResourceGroup on an AlertDefinition, do not load existing AlertDefinitions

-----

commit 9679c7a712fbeb644d4b01a52e347bba634195b7
Author: Joseph Marques <joseph>
Date:   Tue Jun 29 12:42:21 2010 -0400

BZ-608898: when deleting/purging group alert definitions, only load ids

Comment 3 Corey Welton 2010-06-30 13:42:23 UTC
QA Verified.

Comment 4 Corey Welton 2010-08-12 16:47:43 UTC
Mass-closure of verified bugs against JON.