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 1949233 - Unable to disable repo not being used any more
Summary: Unable to disable repo not being used any more
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Cole Higgins
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-13 18:24 UTC by Ben
Modified: 2024-06-14 01:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-02 17:27:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Failure to remove repository (258.16 KB, image/jpeg)
2021-04-13 18:24 UTC, Ben
no flags Details

Description Ben 2021-04-13 18:24:40 UTC
Created attachment 1771680 [details]
Failure to remove repository

Created attachment 1771680 [details]
Failure to remove repository

Description of problem:
I am unable to disable "Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 RPMs x86_64" in my Satellite installation.

Version-Release number of selected component (if applicable):
6.8.5 (upgraded from 6.7.5 and previous).

How reproducible:
Every time.  Although the RHEL6 ELS and RHEL7 Server and RHEL7 Workstation repos for Satellite Tools 6.7 disabled just fine.

Steps to Reproduce:
1. Remove "Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 RPMs x86_64" from all Content Views/delete all content views which reference it.  
2. Go to "Content -> Red Hat Repositories".
3. Click on the "disable" icon for the above repo.

Actual results:
"Repository not found" error message.

Expected results:
Repository disabled.

Additional info:
See attached screen shot.

Comment 1 Ben 2021-04-14 11:25:28 UTC
I've now tried to do it through the command line, and also failed:

[root@satellite1 ~]# hammer -u Admin -p <password> repository-set available-repositories --product-id 103 --id 9706 --organization <org>
-----------------------------------------------------|--------
NAME                                                 | ENABLED
-----------------------------------------------------|--------
Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 (RPMs) | no
-----------------------------------------------------|--------
[root@satellite1 ~]# hammer -u Admin -p <password> repository-set enable --product-id 103 --id 9706 --basearch x86_64
Could not enable repository:
  400 Bad Request
[root@satellite1 ~]# hammer -u Admin -p <password> repository-set disable --product-id 103 --id 9706 --basearch x86_64
Could not disable repository:
  Repository not found
[root@satellite1 ~]# 

I just want to get rid of it from the right hand side of Content -> Red Hat Repositories (and therefore from sync plans, etc.).  I'm not using it in any Content Views.

Comment 2 Ben 2021-04-14 11:36:21 UTC
8980  | yum       | Red Hat Satellite Tools 6.6 for RHEL 8 x86_64 (Debug RPMs)
8979  | yum       | Red Hat Satellite Tools 6.6 for RHEL 8 x86_64 (RPMs)
8981  | yum       | Red Hat Satellite Tools 6.6 for RHEL 8 x86_64 (Source RPMs)
9707  | yum       | Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 (Debug RPMs)
9706  | yum       | Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 (RPMs)
9708  | yum       | Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 (Source RPMs)
10314 | yum       | Red Hat Satellite Tools 6.8 for RHEL 8 x86_64 (Debug RPMs)
10313 | yum       | Red Hat Satellite Tools 6.8 for RHEL 8 x86_64 (RPMs)
10315 | yum       | Red Hat Satellite Tools 6.8 for RHEL 8 x86_64 (Source RPMs)

I can do the following:

[root@satellite1 ~]# hammer -u Admin -p <password> repository-set disable --product-id 103 --id 8979
Could not disable repository:
  Repository not found
[root@satellite1 ~]# hammer -u Admin -p <password> repository-set enable --product-id 103 --id 8979
Repository enabled.
[root@satellite1 ~]# hammer -u Admin -p <password> repository-set disable --product-id 103 --id 8979
Repository disabled.

So it appears Satellite's record for 9706 is partially deleted and for some reason I can't reenable it to disable it again due to a bad request.

Please, how do I fix this?

Comment 3 Ben 2021-04-30 10:40:40 UTC
For reference, I was able to solve this issue with the help of Red Hat Support.  The sequence was:

# su - postgres -c "psql foreman -c 'select * from katello_repositories'" > katello_repos.txt
# hammer repository list > repo_list.txt

From looking at the output text files of those, we extracted the repo ids for the problem repos (note that I have two Organizations in my Satellite, and both had the RHEL8 Tools 6.7 repo 'stuck' enabled, hence two entries:

-----|----------------------------------------------------------------------------------|---------------------------------------------------------------|--------------|---------------------------------------------------------------------------------
ID   | NAME                                                                             | PRODUCT                                                       | CONTENT TYPE | URL                                                                             
-----|----------------------------------------------------------------------------------|---------------------------------------------------------------|--------------|---------------------------------------------------------------------------------
6677 | Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 RPMs x86_64                        | Red Hat Enterprise Linux for x86_64                           | yum          | https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/sat-tools/6.7/os       
6599 | Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 RPMs x86_64                        | Red Hat Enterprise Linux for x86_64                           | yum          | https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/sat-tools/6.7/os

A quick check to see if they were 'valid':

# foreman-rake console
irb(main):001:0> repo = Katello::Repository.find(6677)
[output removed]
irb(main):002:0> repo = Katello::Repository.find(6599)
[output removed]

Then I could use this set of commands to delete it:

irb(main):003:0> repo = Katello::Repository.find(6677)
irb(main):004:0> repo.destroy!
=> nil
irb(main):005:0> repo = Katello::Repository.find(6599)
irb(main):006:0> repo.destroy!
=> nil
irb(main):007:0> exit

The web GUI confirmed in both "Content -> Red Hat Repositories" (Enabled Repositories column) and "Content -> Sync Plans" (drill down into the plan and look for the repo under "Products -> Red Hat Enterprise Linux for x86_64 -> Repositories") that the problem repo was no longer visible for either Organization's Sync Plan.

Comment 4 Brad Buckingham 2022-11-03 21:47:41 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 5 Brad Buckingham 2022-12-02 17:27:05 UTC
Thank you for your interest in Red Hat Satellite. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this feel free to contact your Red Hat Account Team. Thank you.


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