Bug #36482
closedUnable to enable any repository in network sync
Description
Clone from bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=2213128
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
Updated by Hao Yu over 1 year ago
It is because the request returned a hash with string keys like below. Reading the hash value using symbol won't work.
..."arch"=>"x86_64", "major"=>7, "minor"=>"7Server"...
In app/lib/katello/resources/cdn/katello_cdn.rb
def fetch_paths(content_path)
...
url = "/katello/api/v2/repositories?#{query_params.join("&")}"
response = get(url)
json_body = JSON.parse(response) <====================================
results = json_body['results']
results.map do |repo|
Katello::Content.substitute_content_path(arch: repo[:arch], <=============
releasever: repo[:minor], <=============
content_path: content_path)
end
Updated by Quinn James over 1 year ago
- Target version set to Katello 4.8.2
- Triaged changed from No to Yes
Updated by The Foreman Bot over 1 year ago
- Status changed from New to Ready For Testing
- Assignee set to William Clark
- Pull request https://github.com/Katello/katello/pull/10616 added
Updated by The Foreman Bot over 1 year ago
- Fixed in Releases Katello 4.10.0 added
Updated by William Clark over 1 year ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|03e1186c1922658a0f55bada97cda10959611966.
Updated by The Foreman Bot over 1 year ago
- Pull request https://github.com/Katello/katello/pull/10623 added
Updated by The Foreman Bot over 1 year ago
- Pull request https://github.com/Katello/katello/pull/10624 added
Updated by Ewoud Kohl van Wijngaarden over 1 year ago
- Fixed in Releases Katello 4.8.2 added
Updated by Ewoud Kohl van Wijngaarden over 1 year ago
- Fixed in Releases Katello 4.8.3 added
Updated by Ewoud Kohl van Wijngaarden over 1 year ago
- Fixed in Releases deleted (
Katello 4.8.3)