Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-29567

Refresh content counts action on Smart proxy fails when content_counts is set to {}

XMLWordPrintable

    • None
    • None
    • None
    • None

      Description of problem:

      Refresh content counts action on Smart proxy fails when content_counts is set to {}

      How reproducible:

      Always

      Is this issue a regression from an earlier version:

      No

      Steps to Reproduce:

      1. For a smart proxy, set the content counts to {}

      2. Try to refresh content counts on the proxy.

      3. The task fails with the below trace:

      Error:

      NoMethodError

      undefined method `[]' for nil:NilClass

       

      • "/home/vagrant/katello/app/models/katello/concerns/smart_proxy_extensions.rb:185:in
        `process_repository'"
      • "/home/vagrant/katello/app/models/katello/concerns/smart_proxy_extensions.rb:167:in
        `block in repos_content_count'"
      • "/home/vagrant/foreman/.vendor/ruby/3.0.0/gems/activerecord-6.1.7.10/lib/active_record/relation/delegation.rb:88:in
        `each'"
      • "/home/vagrant/foreman/.vendor/ruby/3.0.0/gems/activerecord-6.1.7.10/lib/active_record/relation/delegation.rb:88:in
        `each'"
      • "/home/vagrant/katello/app/models/katello/concerns/smart_proxy_extensions.rb:166:in
        `repos_content_count'"
      • "/home/vagrant/katello/app/models/katello/concerns/smart_proxy_extensions.rb:150:in
        `block in update_content_counts!'"

      Expected behavior:

      Counts should get calculated correctly.

      Business Impact / Additional info:

       

          There are no Sub-Tasks for this issue.

              rhn-engineering-sajha Samir Jha
              rhn-engineering-sajha Samir Jha
              Vladimír Sedmík Vladimír Sedmík
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: