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.
https://github.com/Katello/katello/pull/2973
f7c88ec687127311de20c1075bc0ac635e7f39ee
SHA f7c88ec687127311de20c1075bc0ac635e7f39ee 1006693: Fixing PG error on definition destroy
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..
This was verified and delivered with MDP2. Closing it out.