Bug 815869 - Trying to delete a Dynagroup Definition gives db constraint errors
Trying to delete a Dynagroup Definition gives db constraint errors
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Resource Grouping (Show other bugs)
JON 3.0.1
All All
high Severity unspecified
: ---
: JON 3.1.0
Assigned To: Jay Shaughnessy
Mike Foley
:
Depends On: 817604
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-24 13:22 EDT by dsteigne
Modified: 2013-09-11 07:03 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 817604 (view as bug list)
Environment:
Last Closed: 2013-09-11 07:03:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description dsteigne 2012-04-24 13:22:04 EDT
Description of problem:
I created a new dynagroup with the follow customized expression:
"resource.name.endsWith = .sh"

Recursive flag is checked and recalculation interval is 0.
Now I can't delete this group. JON server shows above: "Failed to delete the selected group definitions"
Here is the stacktrace tail:

"Message: Failed to delete the selected group definitions
Severity :	
Error

Time :	
Thursday, April 19, 2012 2:31:11 PM Etc/GMT+3
Detail :	
java.lang.RuntimeException:[1334856671827] java.lang.RuntimeException:javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state -> javax.transaction.RollbackException:[com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state -> javax.persistence.EntityExistsException:org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update -> org.hibernate.exception.ConstraintViolationException:Could not execute JDBC batch update -> java.sql.BatchUpdateException:Batch entry 0 delete from RHQ_RESOURCE_GROUP where ID='10131' was aborted.  Call getNextException to see the cause.[SQLException=Batch entry 0 delete from RHQ_RESOURCE_GROUP where ID='10131' was aborted.  Call getNextException to see the cause. -> ERROR: update or delete on table "rhq_resource_group" violates foreign key constraint "rhq_resource_group_cluster_resource_group_id_fkey" on table "rhq_resource_group"
  Detail: Key (id)=(10131) is still referenced from table "rhq_resource_group".(error-code=0,sql-state=23503)]

Somehow a cluster group was created, I had to manually delete the cluster group and the main group definition from rhq_resource_group


Version-Release number of selected component (if applicable):
4.2
Comment 1 Charles Crouch 2012-04-30 12:02:21 EDT
Moving sprint tracker bug to upstream issue
Comment 2 Jay Shaughnessy 2012-05-08 11:44:20 EDT
upstream fixed. waiting on 3.1 branch.
Comment 3 Charles Crouch 2012-05-20 21:31:58 EDT
This was fixed in release/jon3.1.x here

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=2f9c4823ea11cfdc6f289d865661b06ed4063c6d

Its available in any recent JON3.1 ER build so pushing this to ONQA
Comment 4 Sunil Kondkar 2012-06-07 07:48:40 EDT
Verified on Version: 3.1.0.CR3 Build Number: 1ceb7bf:74870eb

Created a dynagroup with customized expression:
"resource.name.endsWith = .sh" 
checked Recursive flag and set recalculation interval is 0.

Deleted the dynagroup successfully and no errors are observed. also verified deleting dynagroups after changing the dynagroup name and expression.

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