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

Smart proxy sync can fail when host has no bound container repos

XMLWordPrintable

    • None
    • None
    • None
    • None

      Description of problem:

      Syncing a new smart proxy with no container repos fails. The container gateway DB seems to have no repositories, because the error is:

      Error processing request '604ae9d9-e0fb-4884-91d9-1412ba7ac545: <NoMethodError>: private method `select' called for nil:NilClass
      /usr/share/gems/gems/smart_proxy_container_gateway-3.4.0/lib/smart_proxy_container_gateway/container_gateway_main.rb:211:in `block (2 levels) in build_host_repository_mapping'
      /usr/share/gems/gems/smart_proxy_container_gateway-3.4.0/lib/smart_proxy_container_gateway/container_gateway_main.rb:206:in `each'
      /usr/share/gems/gems/smart_proxy_container_gateway-3.4.0/lib/smart_proxy_container_gateway/container_gateway_main.rb:206:in `filter_map' 

      Looking at https://github.com/Katello/smart_proxy_container_gateway/blob/main/lib/smart_proxy_container_gateway/container_gateway_main.rb#L211 , it seems that an empty repo list can make its way in and cause sync failures.

      Now this doesn't seem to fully block smart proxy syncing because there is a warning, but users will see a failure reported.

      How reproducible:

      Unsure

      Is this issue a regression from an earlier version:

      Likely yes

      Steps to Reproduce:

      1. Create a new smart proxy

      2. Register a content facet to some CV/LCE that is tied to the smart proxy

      3. Ensure the LCE tied to the smart proxy contains no container repos

      4. Ensure the container gateway DB is empty

      5. Sync the smart proxy and see the error

      Actual behavior:
      Sync error

      Expected behavior:
      No sync error.

      Business Impact / Additional info:

       

              rhn-engineering-sajha Samir Jha
              iballou@redhat.com Ian Ballou
              Vladimír Sedmík Vladimír Sedmík
              Quinn James Quinn James
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: