Bug 610179

Summary: failed to uninventory platform when children are in a group
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: Resource GroupingAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.0CC: hrupp
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:55:12 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: 586503    
Bug Blocks:    

Description John Mazzitelli 2010-07-01 17:35:19 UTC
Description of problem:

Agent was shutdown. In inventory is a single Linux platform with 30 children JBossAS 4 servers (and their children of course).

I have one dynagroup definition defined:

resource.type.plugin = JBossAS
resource.type.name = JBossAS Server

And one group (from that dynagroup def) was created. All 30 of my jboss-as instances are in the group. platform is not in any group. There are no other groups defined.

I went to uninventory the platform and got error:

"Failed to uninventory selected resources Cause: javax.ejb.EJBException:java.lang.IllegalArgumentException: Could not remove resources from their containing groups -> java.lang.IllegalArgumentException:Could not remove resources from their containing groups"

This was in the release-3.0.0 branch as of about June 30.

Comment 1 John Mazzitelli 2010-07-01 17:36:08 UTC
I just checked the logs and it looks like its the Oracle 1000-in-clause limit problem that should be fixed in newer code. 

I'm moving this to ON_QA since this should be fixed, but this particular use-case should be tested.

Comment 2 Heiko W. Rupp 2010-07-02 15:41:55 UTC
This is happens in the old code:

2010-07-02 08:48:37,065 ERROR [org.rhq.enterprise.server.resource.ResourceManagerBean] Bulk native query delete error for 'DELETE FROM RHQ_RESOURCE_GROUP_RES_EXP_MAP WHERE RESOURCE_ID IN ( :resourceIds )' for [195522, 195523, 195524, 195525, 195526, 195527, 195528, 195529, 195530, 195531, 195532, 195533, 195534, 195535, 195536, 1955.................]


Still fails with the code from 2010/7/2

2010-07-02 11:41:09,380 ERROR [org.rhq.enterprise.server.resource.ResourceManagerBean] Bulk native query delete error for 'DELETE FROM RHQ_RESOURCE_GROUP_RES_EXP_MAP WHERE RESOURCE_ID IN ( :resourceIds )' for [195522, 195523, 195524, 195525, 195526, 195527, 195528, 195529, 195530, 195531, 195532, 195533, 195534, 195535, 19

Comment 3 Heiko W. Rupp 2010-07-02 16:34:51 UTC
The issue actually also shows up when there is no group is defined in the system.

Comment 4 Heiko W. Rupp 2010-07-06 15:09:36 UTC
d91539e on release-3.0.0 ; tested on perf-env with Oracle

Comment 5 Corey Welton 2010-07-15 12:21:13 UTC
QA Verified.  After having child resources in a dynagroup -- multiple different child resources in different groups, actually --  I was able to successfully uninventory the platform.

Comment 6 Corey Welton 2010-07-15 12:59:16 UTC
To be certain i used appropriate test criteria, i re-ran this with postgresql servers dynagroups and table dynagroups, which references postgresql servers that contained over 1000 tables.  I was still able to uninventory the parent platform.

Comment 7 Corey Welton 2010-07-15 13:38:57 UTC
Tested against postgresql and oracle backends.

Comment 8 Corey Welton 2010-08-12 16:55:12 UTC
Mass-closure of verified bugs against JON.