Hide Forgot
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
Created attachment 578120 [details] relevant catalina log
per jsherrill, this is different than bug #812346, evidenced by the fact that it does not require the creation of environments.
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)
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)
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.
actually that was the incorrect hash, still waiting on ack.
fixed in katello: c89ceafb4d6b09e53898596be67cebe23926bd40
QA Verified in latest brewroot - CloudForms System Engine Version: 0.1.311-1.el6_2
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