Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-8076 When having connection issue, scan CDN always fail silently and return empty result which is hard to debug
  3. SAT-25203

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

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • Repositories
    • Sprint 133, Sprint 134, Sprint 135, Sprint 136, Sprint 137, Sprint 138, Sprint 139, Sprint 140

      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

      { |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

            rhn-support-wclark William Clark (Inactive)
            satellite-focaccia-bot Focaccia Bot
            Samir Jha Samir Jha
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: