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

N-1/N-2 Capsule sync fails with error Unable to update hosts ([RestClient::NotFound]: 404 Not Found)

XMLWordPrintable

    • Known Issue
    • Hide
      Cause:
      Consequence:
      Workaround:
      Result:
      Show
      Cause: Consequence: Workaround: Result:
    • Proposed
    • No Coverage
    • Yes

      Description of problem:

      After upgrading Satellite Server to 6.18 and keeping Capsule at 6.17, Capsule sync fails with the following error:

      2025-12-12T17:31:09 [I|app|3efb45f1] Started POST "/katello/api/capsules/capsule.example.com/content/sync" for 191.168.XX.XX at 2025-12-12 17:31:09 +0800
      2025-12-12T17:31:09 [I|app|3efb45f1] Processing by Katello::Api::V2::CapsuleContentController#sync as HTML
      2025-12-12T17:31:09 [I|app|3efb45f1]   Parameters: {"id"=>"4-capsule.example.com, "skip_metadata_check"=>false, "api_version"=>"v2", "capsule_content"=>{"id"=>"4-capsule.example.com, "skip_metadata_check"=>false}}
      2025-12-12T17:31:09 [I|bac|3efb45f1] Task {label: , execution_plan_id: 8b91308e-c069-40fd-bcfa-539258c0f7ec} state changed: pending 
      2025-12-12T17:31:09 [I|bac|3efb45f1] Task {label: Actions::Katello::CapsuleContent::Sync, id: 66abea95-e9ae-4a5c-bd8a-be4a8e27dfff, execution_plan_id: 8b91308e-c069-40fd-bcfa-539258c0f7ec} state changed: planning 
      2025-12-12T17:31:13 [I|bac|3efb45f1] Task {label: Actions::Katello::CapsuleContent::Sync, id: 66abea95-e9ae-4a5c-bd8a-be4a8e27dfff, execution_plan_id: 8b91308e-c069-40fd-bcfa-539258c0f7ec} state changed: planned 
      2025-12-12T17:31:13 [I|app|3efb45f1]   Rendered /usr/share/gems/gems/katello-4.18.0.4/app/views/katello/api/v2/common/async.json.rabl within katello/api/v2/layouts/resource (Duration: 11.8ms | Allocations: 5725)
      2025-12-12T17:31:13 [I|app|3efb45f1]   Rendered layout /usr/share/gems/gems/katello-4.18.0.4/app/views/katello/api/v2/layouts/resource.json.erb (Duration: 12.0ms | Allocations: 5822)
      2025-12-12T17:31:13 [I|app|3efb45f1] Completed 202 Accepted in 3626ms (Views: 11.0ms | ActiveRecord: 3127.4ms | Allocations: 267507)
      2025-12-12T17:31:13 [I|bac|3efb45f1] Task {label: Actions::Katello::CapsuleContent::Sync, id: 66abea95-e9ae-4a5c-bd8a-be4a8e27dfff, execution_plan_id: 8b91308e-c069-40fd-bcfa-539258c0f7ec} state changed: running 
      2025-12-12T17:31:14 [E|bac|3efb45f1] ERF12-0457 [ProxyAPI::ProxyException]: Unable to update hosts ([RestClient::NotFound]: 404 Not Found) for Capsule https://capsule.example.com:9090/container_gateway/update_hosts (ProxyAPI::ProxyException)
       3efb45f1 | /usr/share/gems/gems/katello-4.18.0.4/lib/proxy_api/container_gateway.rb:37:in `rescue in update_hosts'
       3efb45f1 | /usr/share/gems/gems/katello-4.18.0.4/lib/proxy_api/container_gateway.rb:32:in `update_hosts'
       3efb45f1 | /usr/share/gems/gems/katello-4.18.0.4/app/models/katello/concerns/smart_proxy_extensions.rb:251:in `update_container_gateway_hosts'
       3efb45f1 | /usr/share/gems/gems/katello-4.18.0.4/app/models/katello/concerns/smart_proxy_extensions.rb:238:in `sync_container_gateway'
       3efb45f1 | /usr/share/gems/gems/katello-4.18.0.4/app/lib/actions/katello/capsule_content/sync_capsule.rb:97:in `run'
       3efb45f1 | /usr/share/gems/gems/dynflow-1.9.3/lib/dynflow/action.rb:590:in `block (3 levels) in execute_run'
       3efb45f1 | /usr/share/gems/gems/dynflow-1.9.3/lib/dynflow/middleware/stack.rb:28:in `pass'
       3efb45f1 | /usr/share/gems/gems/dynflow-1.9.3/lib/dynflow/middleware.rb:20:in `pass'
       3efb45f1 | /usr/share/gems/gems/foreman-tasks-11.0.5/app/lib/actions/middleware/rails_executor_wrap.rb:14:in `block in run'
       3efb45f1 | /usr/share/gems/gems/activesupport-7.0.8.7/lib/active_support/execution_wrapper.rb:92:in `wrap'
       3efb45f1 | /usr/share/gems/gems/foreman-tasks-11.0.5/app/lib/actions/middleware/rails_executor_wrap.rb:13:in `run'
       3efb45f1 | /usr/share/gems/gems/dynflow-1.9.3/lib/dynflow/middleware/stack.rb:24:in `call'

      On Capsule, we can see the following errors:

      proxy.log:

      2025-12-12T16:51:01 [I] Execution plan cleaner removing 0 execution plans.
      2025-12-12T17:21:01 [I] Execution plan cleaner removing 0 execution plans.
      2025-12-12T17:31:14 3efb45f1 [I] Started PUT /container_gateway/repository_list/ 
      2025-12-12T17:31:14 3efb45f1 [I] Finished PUT /container_gateway/repository_list/ with 200 (1.39 ms)
      2025-12-12T17:31:14 3efb45f1 [I] Started GET /container_gateway/users 
      2025-12-12T17:31:14 3efb45f1 [I] Finished GET /container_gateway/users with 200 (0.98 ms)
      2025-12-12T17:31:14 3efb45f1 [I] Started PUT /container_gateway/update_hosts/ 
      2025-12-12T17:31:14 3efb45f1 [I] Finished PUT /container_gateway/update_hosts/ with 404 (1.07 ms)
      2025-12-12T17:51:01 [I] Execution plan cleaner removing 0 execution plans.
      2025-12-12T18:21:01 [I] Execution plan cleaner removing 0 execution plans. 

       

      STEPS to reproduce:

      • Install a satellite 6.17.z and capsule 6.17.z
      • SYnc some rpm as well as container content in both
      • Upgrade the satellite only, to 6.18.1 and leave the capsule on 6.17
      • Retry another capsule sync

       

      Additional Information:

      The issue happens as `/container_gateway/update_hosts/` endpoint does not exists on a 6.17 and hence 404. 

              rhn-engineering-sajha Samir Jha
              rhn-support-sabhasin Sahil Bhasin
              Sayan Das
              Vladimír Sedmík Vladimír Sedmík
              Ian Ballou Ian Ballou
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: