Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 813427 - JDBC error when trying to delete org.
Summary: JDBC error when trying to delete org.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks: 812346
TreeView+ depends on / blocked
 
Reported: 2012-04-17 18:28 UTC by Corey Welton
Modified: 2019-09-25 20:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-15 18:59:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
relevant catalina log (217.66 KB, application/octet-stream)
2012-04-17 18:32 UTC, Corey Welton
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:0665 0 normal SHIPPED_LIVE new packages: katello 2012-05-15 22:27:22 UTC

Description Corey Welton 2012-04-17 18:28:13 UTC
Discovered when trying to test bug #812346. I have repeated this four times in a row -- three after having created environments (per aformentioned bz) and once w/o creating environments 


1. Create org 812346
3. Switch to org 812346; Upload manifest
4. Enable repo 6Server - x86_64 - Red Hat Enterprise Linux 6 Server RPMs x86_64
5. 6Server; do not promote
6. Switch to ACME_Corporation
7. Attempt to delete 812346
8. Navigate around the UI a bit, or perhaps just try to create another org (812346_new or what have you).  

Current result:

Org delete is scheduled for background deletion
Upon attempting to delete org:

Candlepin::Content: 500 Internal Server Error {"displayMessage":"Runtime Error
Could not execute JDBC batch update at
org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError:2,598"}
(DELETE /candlepin/content/861)

At this point, the org has disappeared from the UI, but still exists in the
background - and user cannot use the manifest from before, as CFSE thinks the
manifest is still in use.

katello-0.1.310-1.el6_2.noarch
katello-all-0.1.310-1.el6_2.noarch
candlepin-0.5.27-1.el6.noarch


Expected result:
* Org is deleted
* If org fails to be deleted, we don't end up in a wedged state.

Will be attaching relevant tomcat logs


Other notes:
Probably blocks testing for bug #812346

Comment 1 Corey Welton 2012-04-17 18:32:14 UTC
Created attachment 578120 [details]
relevant catalina log

Comment 2 Corey Welton 2012-04-17 18:36:30 UTC
per jsherrill, this is different than bug #812346, evidenced by the fact that it does not require the creation of environments.

Comment 3 Devan Goodwin 2012-04-18 18:20:48 UTC
Candlepin is refusing to delete the content as a product is still set to reference it. This might be wrong and Candlepin should cleanup any product references, but it also might be acting correctly and preventing the deletion of something that crosses organizations, a RH product for example.

I guess it's a question of what product was still referencing that content?

I would try to look at the results of some SQL queries after this happens:

select * from cp_product_content where content_id = failedID;

Then match up with cp_product and see which product that is, is it something used across orgs? 

If this is custom content involved, and definitely isn't used in another org, then we need to decide if Katello can/should delete the product first, or if Candlepin should clean up the references automatically. Given the global nature of products though I am tempted to leave the restriction in place and see if we can't get Katello doing product delete prior to content delete.

(bearing in mind content can be shared by multiple products, used by subscriptions in multiple orgs)

Comment 4 Justin Sherrill 2012-04-18 19:24:36 UTC
some information:  



    candlepin=# select * from cp_product_content where content_id = '861';
    product_id | content_id | enabled | created | updated
    ------------+------------+---------+---------+---------
    RH0103708 | 861 | f | |
    (1 row)
     
     
    candlepin=# select name from cp_product where id = 'RH0103708';
    name
    -----------------------------------------------------------------------
    Red Hat Enterprise Linux Server, Premium (8 sockets) (Up to 4 guests)
    (1 row)

Comment 5 Justin Sherrill 2012-04-19 18:54:01 UTC
katello fix:

37f0e5a5d77bbe28fb8dd45dd7c5f358de771c9d

no longer deleting content objects from candlepin in the case of a redhat consumer.  We still disassociate the content from the product in all cases.

Comment 6 Justin Sherrill 2012-04-19 19:00:05 UTC
actually that was the incorrect hash, still waiting on ack.

Comment 7 Justin Sherrill 2012-04-19 20:15:45 UTC
fixed in katello:

c89ceafb4d6b09e53898596be67cebe23926bd40

Comment 10 Corey Welton 2012-04-23 15:33:16 UTC
QA Verified in latest brewroot - CloudForms System Engine Version: 0.1.311-1.el6_2

Comment 11 errata-xmlrpc 2012-05-15 18:59:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-0665.html


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