Project

General

Profile

Bug #32036

"Failed to discover docker repositories because 'Content Default HTTP Proxy' is not used to connect to the registry."

Added by James Jeffers about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

'Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1893617 \n\n*Description of problem:*\nThe Satellite that needs to connect to the RHSM/CDN via a HTTP Proxy failed to discover docker repositories (Web UI > Content -> Products -> Click Repo Discovery) because Satellite doesn\'t use the \'Content Default HTTP Proxy\' when connecting to the docker registry.\n\nHow to reproduce:\n1. In Satellite block outgoing port 443 to simulate no the no internet connection.\n\nfirewall-cmd --direct --add-rule ipv4 filter OUTPUT 1 -p tcp -m tcp --dport=443 -j REJECT\n\n2. Try to discover the registry.redhat.io in Web UI -> Content -> Products -> Click Repo Discovery. You should get connection refused error.\n3. Add a http proxy in Web UI -> Infrastructure -> Http Proxies -> New Http Proxy\n4. Set the added http proxy as Web UI -> Settings -> Content -> Default HTTP Proxy\n5. Again, try to discover the registry.redhat.io in Web UI -> Content -> Products -> Click Repo Discovery.\n\n*Actual results:*\nDiscovery failed. Error: Failed to open TCP connection to registry.redhat.io:443 (Connection refused - connect(2) for "registry.redhat.io" port 443)\n\n*Expected results:*\nDiscover successfully\n\n\n*Additional info:*\nHowever, it can connect successfully after setting the http proxy in Setting -> General -> HTTP proxy\n\n\nIn \'app/lib/katello/repo_discovery.rb\'\n-----------------------------------\n def docker_search\n params = {\n :accept => :json\n }\n params[:user] = @upstream_username unless @upstream_username.empty?\n params[:password] = @upstream_password unless @upstream_password.empty?\n begin\n results = RestClient.get(@uri.to_s + "v1/search?q=#{@search}", params) <====== ####\'default_global_content_proxy\' is not set here. If Setting[:http_proxy] is set then it will be used. ####\n\n JSON.parse(results)[\'results\'].each do |result|\n @found << result[\'name\']\n end\n rescue\n # Note: v2 endpoint does not support search\n results = RestClient.get(@uri.to_s + "v2/_catalog", params) <====== ####\'default_global_content_proxy\' is not set here. If Setting[:http_proxy] is set then it will be used. ####\n\n @found = JSON.parse(results)[\'repositories\']\n end\n @found.sort!\n end\n------------------------------------------'

Associated revisions

Revision fdff81f5 (diff)
Added by James Jeffers about 1 year ago

Fixes #32036 - provides proxy parameter to repo discovery get operations

History

#1 Updated by James Jeffers about 1 year ago

  • Assignee changed from Partha Aji to James Jeffers
  • Subject changed from "Failed to discover docker repositories because 'Content Default HTTP Proxy' is not used to connect to the registry." to "Failed to discover docker repositories because 'Content Default HTTP Proxy' is not used to connect to the registry."
  • Found in Releases Katello 4.0.0 added

#2 Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/9210 added

#3 Updated by James Jeffers about 1 year ago

  • Triaged changed from No to Yes
  • Target version set to Katello 4.1.0

#4 Updated by The Foreman Bot about 1 year ago

  • Fixed in Releases Katello 4.2.0 added

#5 Updated by James Jeffers about 1 year ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF