Bug 1006693

Summary: Deleting a content-view-definition which contains filters too raises PG error
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: WebUIAssignee: David Davis <daviddavis>
Status: CLOSED CURRENTRELEASE QA Contact: Sachin Ghai <sghai>
Severity: high Docs Contact:
Priority: high    
Version: NightlyCC: ehelms, sghai
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-24 17:07:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
deleting a CV that contains filters too raises PG error none

Description Sachin Ghai 2013-09-11 06:25:09 UTC
Created attachment 796267 [details]
deleting a CV that contains filters too raises PG error

Description of problem:
Deleting the whole content-view definition via UI that also includes filters, raises a PG error:

-

ERROR: update or delete on table "content_view_definition_bases" violates foreign key constraint "filters_content_view_definition_id_fk" on table "filters" DETAIL: Key (id)=(4) is still referenced from table "filters". (PGError) 
-


Version-Release number of selected component (if applicable):
katello-1.4.3-1.git.283.027d743.el6.noarch


How reproducible:
always

Steps to Reproduce:
1. Create a content-view definition
2. Add repository
3. define filter
4. remove content-view definition

Actual results:
-
ERROR: update or delete on table "content_view_definition_bases" violates foreign key constraint "filters_content_view_definition_id_fk" on table "filters" DETAIL: Key (id)=(4) is still referenced from table "filters". (PGError) 
-

Expected results:


Additional info: I can remove a empty CV definition successfully. So make sure some filters must be defined before deleting the CV.

Comment 2 David Davis 2013-09-17 16:25:09 UTC
https://github.com/Katello/katello/pull/2973

Comment 3 David Davis 2013-09-18 18:53:10 UTC
f7c88ec687127311de20c1075bc0ac635e7f39ee

Comment 4 David Davis 2013-09-18 18:53:48 UTC
SHA f7c88ec687127311de20c1075bc0ac635e7f39ee

1006693: Fixing PG error on definition destroy

Comment 6 Sachin Ghai 2013-10-18 13:53:37 UTC
Verified with snap6 compose2 (MDP2)


katello-qpid-client-key-pair-1.0-1.noarch
katello-glue-candlepin-1.4.6-40.el6sat.noarch
katello-1.4.6-40.el6sat.noarch
katello-foreman-all-1.4.6-40.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-configure-1.4.7-6.el6sat.noarch
signo-katello-0.0.23-2.el6sat.noarch
katello-glue-elasticsearch-1.4.6-40.el6sat.noarch
ruby193-rubygem-katello-foreman-engine-0.0.12-3.el6sat.noarch
katello-cli-1.4.3-24.el6sat.noarch
katello-certs-tools-1.4.4-1.el6sat.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
ruby193-rubygem-foreman-katello-engine-0.0.17-6.el6sat.noarch
katello-common-1.4.6-40.el6sat.noarch
pulp-katello-plugins-0.2-1.el6sat.noarch
katello-configure-foreman-1.4.7-6.el6sat.noarch
katello-selinux-1.4.4-4.el6sat.noarch
katello-cli-common-1.4.3-24.el6sat.noarch
katello-glue-pulp-1.4.6-40.el6sat.noarch
katello-all-1.4.6-40.el6sat.noarch
ruby193-rubygem-katello_api-0.0.3-4.el6sat.noarch


I can delete the CV that contains filter too..

Comment 7 Bryan Kearney 2014-04-24 17:07:25 UTC
This was verified and delivered with MDP2. Closing it out.