Bug 2213128

Summary: Unable to enable any repository in network sync
Product: Red Hat Satellite Reporter: Hao Chang Yu <hyu>
Component: Inter Satellite SyncAssignee: wclark
Status: CLOSED ERRATA QA Contact: Vladimír Sedmík <vsedmik>
Severity: high Docs Contact:
Priority: high    
Version: 6.12.4CC: ahumbe, jalviso, mkalyat, osousa, pcreech, pmoravec, rlavi, saydas, smeyer, vsedmik, wclark
Target Milestone: 6.14.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2218653 2227900 (view as bug list) Environment:
Last Closed: 2023-11-08 14:19:28 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:
Attachments:
Description Flags
Hotfix RPM for Satellite 6.12.4 none

Description Hao Chang Yu 2023-06-07 07:53:12 UTC
Description of problem:
Unable to enable any repository in network sync Satellite because "Scan cdn" task failed with "No repositories available".

Go to Web Ui -> Tasks page, I found that "Scan cdn" task keeps running forever.

In production log I can see the following infinity loops.
~~~
CDN: Requesting path https://satellite.example.com:443/katello/api/v2/repository_sets?organization_id=1&search=path+%3D+%2Fcontent%2Fdist%2Frhel%2Fserver%2F7%2F%24releasever%2F%24basearch%2Fsupplementary%2Fos
CDN: Requesting path https://satellite.example.com:443/katello/api/v2/organizations/1/content_views?search=label%3DDefault_Organization_View
CDN: Requesting path https://satellite.example.com:443/katello/api/v2/organizations/1/environments?full_result=true
CDN: Requesting path https://satellite.example.com:443/katello/api/v2/repositories?full_result=true&organization_id=1&content_view_id=1&environment_id=1&search=content_label+%3D+rhel-7-server-supplementary-rpms
...
...
CDN: Requesting path https://satellite.example.com:443/katello/api/v2/repository_sets?organization_id=1&search=path+%3D+%2Fcontent%2Fdist%2Frhel%2Fserver%2F7%2F%24releasever%2F%24basearch%2Fsupplementary%2Fos
CDN: Requesting path https://satellite.example.com:443/katello/api/v2/organizations/1/content_views?search=label%3DDefault_Organization_View
CDN: Requesting path https://satellite.example.com:443/katello/api/v2/organizations/1/environments?full_result=true
CDN: Requesting path https://satellite.example.com:443/katello/api/v2/repositories?full_result=true&organization_id=1&content_view_id=1&environment_id=1&search=content_label+%3D+rhel-7-server-supplementary-rpms
~~~

Version-Release number of selected component (if applicable):
Satellite 6.12.3+
Satellite 6.13 also affected


How reproducible:
Easy


Steps to Reproduce:
1. Setup a network sync Satellite to sync with another Satellite.
2. Try to enable repository

Actual results:
No repositories can be enabled

Expected results:
Can enable repositories

Comment 3 Bryan Kearney 2023-06-21 12:03:05 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36482 has been resolved.

Comment 4 Pavel Moravec 2023-06-22 09:50:15 UTC
*** Bug 2216453 has been marked as a duplicate of this bug. ***

Comment 6 Vladimír Sedmík 2023-07-13 10:04:01 UTC
Verified in 6.14.0 snap 7:

Steps to verify:

A) On Upstream SAT:
1) Set 'Default Red Hat Repository download policy' to immediate.
2) Uploaded manifest with subscriptions.
3) Enabled and synced several RH repos (ansible, rhel8_bos).

B) On Downstream SAT:
1) Created content credentials for the Upstream SAT.
2) In WebUI Content -> Subscriptions -> Manage Manifest -> CDN Configuration -> Network Sync -> provided Upstream SAT details (incl. CC)
3) Set 'Default Red Hat Repository download policy' to immediate.
4) Uploaded same manifest as Upstream SAT had.
5) Enabled the repos from A3) (succeeded) and synced them to Downstream SAT (succeeded). Checked the content was downloaded.
6) Tried to enable other RH repos (not synced nor enabled on the Upstream SAT) - "No repositories available." message was shown in reposet details.
In some cases (advanced-virt-crb-for-rhel-8-s390x-rpms for example) the repo appeared available on the Downstream SAT instead of the message, however, any attempt to enable it on the Downstream SAT shown proper message "Repository with content label: 'advanced-virt-crb-for-rhel-8-s390x-rpms', arch: 'noarch' was not found in upstream organization 'Default_Organization', content view 'Default_Organization_View' and lifecycle environment 'Library'"
7) Tried to enable/disable different archs within different reposets, checked they became available and could be enabled on the Downstream SAT (just enable without syncs).

Comment 7 wclark 2023-07-31 16:44:31 UTC
Created attachment 1980925 [details]
Hotfix RPM for Satellite 6.12.4

INSTALL INSTRUCTIONS:

1. Take a complete backup or snapshot of Satellite 6.12.4 server

2. Download the hotfix RPM attached to this BZ and copy it to Satellite server

3. # dnf install ./rubygem-katello-4.5.0.33-2.HOTFIXRHBZ2213128.el8sat.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 10 errata-xmlrpc 2023-11-08 14:19:28 UTC
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 (Important: Satellite 6.14 security and bug fix update), 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/RHSA-2023:6818