-
Sub-task
-
Resolution: Done
-
Undefined
-
None
-
None
-
False
-
-
False
-
0
-
Phoenix
-
-
-
Sprint 133, Sprint 134, Sprint 135, Sprint 136, Sprint 137, Sprint 138, Sprint 139, Sprint 140, Sprint 141
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 Satellite, 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 Satellite 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
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
QE Tracker for https://issues.redhat.com/browse/SAT-8076
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1896209