Bug 556848 - Cannot delete RHN repo
Summary: Cannot delete RHN repo
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Content
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Jay Dobies
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks: RHQ_CONT_REPO
TreeView+ depends on / blocked
 
Reported: 2010-01-19 15:43 UTC by Corey Welton
Modified: 2010-08-12 16:45 UTC (History)
2 users (show)

Fixed In Version: 2.4
Clone Of:
Environment:
Last Closed: 2010-08-12 16:45:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Corey Welton 2010-01-19 15:43:06 UTC
Description of problem:

User gets db error when trying to delete content providers

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


How reproducible:
Every time, I think

Steps to Reproduce:
1. Create an RHN Content provider
2. Import a channel repo.
3. Delete Channel Repo
4. Attempt to delete Content Provider
  
Actual results:

Failed to delete content providers. Cause: javax.ejb.EJBException:javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not execute update query -> javax.persistence.EntityExistsException:org.hibernate.exception.ConstraintViolationException: could not execute update query -> org.hibernate.exception.ConstraintViolationException:could not execute update query -> org.postgresql.util.PSQLException:ERROR: update or delete on table "rhq_package_version" violates foreign key constraint "rhq_advisory_package_package_version_id_fkey" on table "rhq_advisory_package" Detail: Key (id)=(10004) is still referenced from table "rhq_advisory_package".[SQLException=ERROR: update or delete on table "rhq_package_version" violates foreign key constraint "rhq_advisory_package_package_version_id_fkey" on table "rhq_advisory_package" Detail: Key (id)=(10004) is still referenced from table "rhq_advisory_package".]

Expected results:

CP can be deleted.

Additional info:

Comment 1 Jay Dobies 2010-02-10 21:19:52 UTC
Commit dbc2429e2a4c6eb03109ded64d30a104490c4623

Advisory.java
AdvisoryPackage.java
ContentSourceManagerBean.java
ContentSourceRepoFlowTest.java

Need to make sure we delete orphaned advisories when deleting orphaned packages.

Comment 2 Corey Welton 2010-02-12 17:09:41 UTC
QA Verified.

Comment 3 Corey Welton 2010-08-12 16:45:26 UTC
Mass-closure of verified bugs against JON.


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