Bug 1244314
Summary: | Disabling used repository_set removes repo already from candlepin and pulp before chcking it is used | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Peter Vreman <peter.vreman> |
Component: | Content Management | Assignee: | Brad Buckingham <bbuckingham> |
Status: | CLOSED ERRATA | QA Contact: | Tazim Kolhar <tkolhar> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.8 | CC: | bbuckingham, chpeters, cwelton, jsherril, mmccune, tkolhar |
Target Milestone: | Unspecified | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://projects.theforeman.org/issues/11436 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-10-15 18:20:23 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1122832 |
Description
Peter Vreman
2015-07-17 18:32:00 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. Created redmine issue http://projects.theforeman.org/issues/11436 from this bug Created upstream katello PR: https://github.com/Katello/katello/pull/5428 With this PR, user would see behavior similar to: - When there are existing content view versions using the repository: hammer> repository-set disable --organization-id 1 --product-id 92 --id 3983 --basearch x86_64 --releasever 7Server Could not disable repository: Repository cannot be deleted since it has already been included in a published Content View. Please delete all Content View versions containing this repository before attempting to deleting it. - When there are no existing content view versions using the repository: hammer> repository-set disable --organization-id 1 --product-id 92 --id 3983 --basearch x86_64 --releasever 7Server Repository disabled This issue is more generic than described here with the repository-set. Currently it is allowed to delete a custom product repository that is still in used by a content view. It deleted it from pulp and then stops in the finalize step where the database reports ERROR: update or delete on table "katello_repositories" violates foreign key constraint "repositories_library_instance_id_fk" on table "katello_repositories" That should also make creating a unit test case for it more easy. Hi Peter, Correct. I ran a test of deleting a custom repository with the changes and the behavior is similar. - When there are existing content view versions using the repository: hammer> repository delete --id 1 --product-id 1 --organization-id 1 Could not delete the Repository: Repository cannot be deleted since it has already been included in a published Content View. Please delete all Content View versions containing this repository before attempting to deleting it. - When there are no existing content view versions using the repository: hammer> repository delete --id 1 --product-id 1 --organization-id 1 Repository deleted Hi, Below are the results of verification steps: 1. Enable a RedHat repository 2. Create and Publish Content View using the RedHat repo 3. Disable the RedHat repository 4. List products Please note here, Scenario 1 when content view version is associated with the Redhat repo I am unable to disable the redhat repo (screen shot attached) product is listed Scenario 2 when content view version is removed or deleted then I am able to disable to repository product is still listed please, comment/reply in case anything is missing thanks Thanks and Regards, Tazim VERIFIED: # rpm -qa | grep foreman ruby193-rubygem-foreman_hooks-0.3.7-2.el7sat.noarch rubygem-hammer_cli_foreman-0.1.4.14-1.el7sat.noarch ruby193-rubygem-foreman_bootdisk-4.0.2.13-1.el7sat.noarch foreman-vmware-1.7.2.40-1.el7sat.noarch rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el7sat.noarch foreman-debug-1.7.2.40-1.el7sat.noarch foreman-proxy-1.7.2.6-1.el7sat.noarch foreman-1.7.2.40-1.el7sat.noarch foreman-gce-1.7.2.40-1.el7sat.noarch ruby193-rubygem-foreman-redhat_access-0.2.3-1.el7sat.noarch rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el7sat.noarch hp-xw6600-02.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch hp-xw6600-02.rhts.eng.bos.redhat.com-foreman-proxy-1.0-2.noarch foreman-compute-1.7.2.40-1.el7sat.noarch ruby193-rubygem-foreman_docker-1.2.0.22-1.el7sat.noarch ruby193-rubygem-foreman-tasks-0.6.15.7-1.el7sat.noarch rubygem-hammer_cli_foreman_tasks-0.0.3.5-1.el7sat.noarch foreman-libvirt-1.7.2.40-1.el7sat.noarch foreman-postgresql-1.7.2.40-1.el7sat.noarch hp-xw6600-02.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch foreman-ovirt-1.7.2.40-1.el7sat.noarch foreman-selinux-1.7.2.13-1.el7sat.noarch ruby193-rubygem-foreman_discovery-2.0.0.19-1.el7sat.noarch rubygem-hammer_cli_foreman_docker-0.0.3.9-1.el7sat.noarch ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el7sat.noarch steps: 1. Enable a RedHat repository 2. Create and Publish Content View using the RedHat repo 3. Disable the RedHat repository 4. List products Unable to disable the repo List products works 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. https://access.redhat.com/errata/RHBA-2015:1911 |