This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2141063 - [RFE] Unable to delete repository if it was included to composite CV
Summary: [RFE] Unable to delete repository if it was included to composite CV
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: stream
Assignee: Samir Jha
QA Contact: Sam Bible
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-08 16:27 UTC by Marek Hulan
Modified: 2024-06-06 12:47 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 12:47:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 11760 0 Normal Closed Unable to delete repository if it was included to composite CV 2024-01-16 16:24:15 UTC
Red Hat Issue Tracker   SAT-19210 0 None Migrated None 2024-06-06 12:47:38 UTC

Internal Links: 2077529

Description Marek Hulan 2022-11-08 16:27:00 UTC
Description of problem:
As a user I'm unable to find which content view is preventing repository from being deleted
if repository is included to removed version of content view which was included into composite
content view (yeah, it was complex, I know :D).

Steps to Reproduce:
1. Create repository X;
2. Create content view A;
3. Include repository X to content view A;
4. Publish content view A to library;
5. Create composite content view B;
6. Include content view A to composite content view B;
7. Publish content view B to library;
8. Remove all versions of content view A;
9. Try to remove repository X.

Actual results:
RuntimeError: 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.

Expected results:
Either indicate content view id which is preventing repository removal or
prevent content view versions from being deleted if it was included into composite content view.

Additional info:
# hammer content-view list
can't help in this situation as it was not showing repository ids for composite content views.

# rpm -qa | grep katello
katello-installer-base-2.2.2-1.el7.noarch
katello-service-2.2.1-0.el7.noarch
katello-debug-2.2.1-0.el7.noarch
katello-selinux-2.2.1-1.el7.noarch
katello-common-2.2.1-0.el7.noarch
katello-server-ca-1.0-2.noarch
katello-certs-tools-2.0.1-1.el7.noarch
katello-default-ca-1.0-1.noarch
katello-agent-2.2.1-1.el7.noarch
rubygem-hammer_cli_katello-0.0.14-1.el7.noarch
katello-2.2.1-0.el7.noarch
ruby193-rubygem-katello-2.2.2-2.el7.noarch
katello-installer-2.2.2-1.el7.noarch
pulp-katello-0.4-1.el7.noarch

Comment 1 Marek Hulan 2022-11-08 16:27:04 UTC
Created from redmine issue https://projects.theforeman.org/issues/11760

Comment 2 Marek Hulan 2022-11-08 16:27:05 UTC
Upstream bug assigned to None

Comment 3 Sayan Das 2023-05-10 17:27:25 UTC
Would https://bugzilla.redhat.com/show_bug.cgi?id=2123932 not resolv the main concern here ?

That new feature for force deletion of a repo works very well whether It was included in CV or CCV ( and several versions of them ). So a user would not need to know where the repository is. If the goal is to delete the repo without needing to re-publish the CV or CCVs, this is the option to go for.


And in case the user wants to find out related CV or CCV versions, They can do it with this rake ( where 52 is the ID of the repo taken from "hammer repository list" command ):

# cat << EOF | foreman-rake console
conf.echo = false
Katello::Repository.find(52).clones.each { |repo| puts "Repo => #{repo.name} | CV => #{repo.content_view.name} | Version => #{repo.content_view_version.version} | Version_ID => #{repo.content_view_version.id} | Lifecycle => #{repo.content_view_version.environments.map(&:name).join(',')}"}  ; nil
EOF

Comment 7 Brad Buckingham 2023-12-01 18:41:30 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 8 Bryan Kearney 2023-12-20 16:02:11 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/11760 has been resolved.

Comment 10 Brad Buckingham 2024-01-09 20:04:30 UTC
Based upon feedback during auto-closure, leaving this bugzilla open a while longer for additional investigation; however, it may be closed in a future iteration.

Comment 12 Sam Bible 2024-03-27 18:40:58 UTC
Verified on Satellite Stream - version 51

Steps to Verify:
1) Create a Repository
2) Create a CV
3) Add the Repository to the CV, and publish the CV
4) Attempt to Delete the repository with `hammer repository delete --id=$REPO_ID`

Expected Results:
The Repository can't be deleted, and the message returned includes text mentioning the --remove-from-content-view-versions flag as a way to delete the Repository while also removing it from published CV Versions.
Running the command again with the --remove-from-content-view-versions true option successfully deletes the Repository

Actual Results:
The Repository can't be deleted, and the message returned includes text mentioning the --remove-from-content-view-versions flag as a way to delete the Repository while also removing it from published CV Versions.
Running the command again with the --remove-from-content-view-versions true option successfully deletes the Repository

Comment 13 Eric Helms 2024-06-06 12:47:40 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.