Bug 1928998 - Getting "Repository not found" error when disabling RHEL 8 repositories on Satellite 6.8 [NEEDINFO]
Summary: Getting "Repository not found" error when disabling RHEL 8 repositories on Sa...
Keywords:
Status: NEW
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: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-16 00:02 UTC by Hao Chang Yu
Modified: 2023-07-31 00:29 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:
saydas: needinfo? (hyu)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-18745 0 None None None 2023-07-01 00:31:14 UTC
Red Hat Knowledge Base (Solution) 6301451 0 None None None 2022-03-16 12:19:21 UTC

Description Hao Chang Yu 2021-02-16 00:02:02 UTC
Description of problem:
Can't disable a rhel 8 repository on Satellite 6.8 if it was enabled on older Satellite version (Satellite 6.6 and older). This issue is caused by incorrect arch that Satellite uses to resolve all RHEL 8 repos. The database is storing "x86_64" but Satellite is looking for "noarch" when disabling the repository. Therefore, "Repository not found" error is raised. This is affecting the RHEL 8 repositories that were enabled on older Satellite version (Satellite 6.6 and older). When enabling a RHEL 8 repository, the older Satellite version will set its arch to "x86_64". However, Satellite 6.8 will set its arch to "noarch".

Steps to Reproduce:
1. Enable a rhel 8 repository on Satellite 6.6, such as rhel 8 baseos or appstreams
2. Upgrade the Satellite to 6.8
3. Disable the rhel 8 repository

Actual results:
Repository not found

Expected results:
Repository can be disabled successfully

Additional info:

This issue can be workaround by changing the root repo's arch from x86_64 to noarch.

foreman-rake console
Katello::RootRepository.where(name: ["Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs x86_64 8", "Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs x86_64 8", "Red Hat Satellite Tools 6.7 for RHEL 8 x86_64 RPMs x86_64"]).update_all(arch: "noarch")
exit

Comment 1 Sayan Das 2022-03-16 12:18:57 UTC
This seems the same scenario as explained in 

1973329 – Provide upstream repository name value to allow a name change on the repository to not break Satellite if an enabled repository's name gets changed
https://bugzilla.redhat.com/show_bug.cgi?id=1973329


Hello Hao, Can you please check in https://bugzilla.redhat.com/show_bug.cgi?id=1973329#c4 and confirm the same ?


I guess, It would be best to have just one of the BZs alive and worked on if the end goal is the same.




-- Sayan


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