Project

General

Profile

Actions

Bug #37697

closed

[DEV] When having connection issue, scan CDN always fail silently and return empty result which is hard to debug

Added by Ian Ballou 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

[DEV] When having connection issue, scan CDN always fail silently and return empty result which is hard to debug
Cloned from 16009677

Description of problem:
Scan CDN always fail silently when it encounter an error connecting to the Red Hat CDN for whatever reason, such as 403 forbidden and http proxy issue. It just return an empty result without any error. This makes it very hard to debug an issue when empty result is returned.

Steps to Reproduce:
1. In the Foreman, use firewall to block connection to 443 port to simulate the connection issue

firewall-cmd --direct --add-rule ipv4 filter OUTPUT 1 -p tcp -m tcp --dport=443 -j REJECT

2. Login to the Foreman web ui -> Content -> Red Hat Repositories page. Expand any repository set

Actual results:
No repositories available.

Expected results:
Should raise proper error

Additional info:

In 'app/lib/katello/util/cdn_var_substitutor.rb'

def find_substitutions(paths_with_substitutions)
to_resolve = paths_with_substitutions.select { |path| path.substitutable? }
resolved = paths_with_substitutions - to_resolve
return resolved if to_resolve.empty?
futures = to_resolve.map do |path_with_substitution|
Concurrent::Promises.future do
path_with_substitution.resolve_substitutions(@resource)
end
end
futures.each do |future|
begin
resolved << future.value <=============== Might need to use future.value! here so that exception can be raised
end
end
find_substitutions(resolved.compact.flatten)
end

DEV Tracker for https://issues.redhat.com/browse/SAT-8076
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1896209

Actions #1

Updated by Chris Roberts 4 months ago

  • Category set to Repositories
  • Status changed from New to Assigned
  • Assignee set to William Clark
  • Target version changed from Katello 4.15.0 to Katello 4.14.0
  • Triaged changed from No to Yes
Actions #2

Updated by The Foreman Bot 3 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/11100 added
Actions #3

Updated by The Foreman Bot 3 months ago

  • Fixed in Releases Katello 4.14.0 added
Actions #4

Updated by William Clark 3 months ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF