Bug 784905

Summary: Can not delete owner with generated uebercert
Product: [Community] Candlepin Reporter: Ivan Necas <inecas>
Component: candlepinAssignee: candlepin-bugs
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.5CC: bcourt, dgoodwin, redakkan, skallesh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-17 13:03:55 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:    
Bug Blocks: 771957    

Description Ivan Necas 2012-01-26 15:45:43 UTC
Description of problem:

After uebercert generation there is created a special consumer created and subscribed to a special uebercert product. These are mostly (or entirely) used to generate entitlement certificate that allows access all the content of the owner. There is a problem however when deleting owner with such a uebercert generated.

Uebercert porduct and pools can't be filtered by owner and when trying deleting the consumer we get

"Runtime Error null at org.candlepin.service.impl.DefaultIdentityCertServiceAdapter.deleteIdentityCert:67"

Since this ueber-consumers and products are mostly internal thing of CP, I suggest CP to deal with it without any requirement on API calls from client (Katello in this case).

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

How reproducible:
always

Steps to Reproduce:
1. create owner
2. generate uebercert
3. delete owner

  
Actual results:
ERROR: update or delete on table "cp_owner" violates foreign key constraint
"fk_pool_owner" on table "cp_pool"
  Detail: Key (id)=(4028fa81351962fc013519686cd30003) is still referenced from
table "cp_pool".

Expected results:
Owner deleted successfully

Additional info:

This quite a big issue on Katello side
https://bugzilla.redhat.com/show_bug.cgi?id=741678

Comment 1 Ivan Necas 2012-01-26 15:46:21 UTC
Which was marked as duplicate to https://bugzilla.redhat.com/show_bug.cgi?id=771957

Comment 2 Devan Goodwin 2012-02-03 19:23:39 UTC
Fixed in candlepin.git master: 13ac1277d689155a5ea89f25905f54e714b763c2

Will appear in candlepin-0.5.16-1 and later.

Comment 3 Bryan Kearney 2012-07-17 13:03:55 UTC
Marking all community bugs modified or beyong as closed.