Problem:
after upgrading smart proxy from version 3.10.1 to 3.11.2 Foreman sync is obviously broken to smart proxies.
Pulp plugin missing for synchronizable content types: yum.
Repositories containing these content types will not be synced.
Expected outcome:
rpm sync works
Foreman and Proxy versions:
Foreman 3.11.2 Katello 4.13
Smart Proxy 3.11.2 Katello 4.13
Foreman and Proxy plugin versions:
Distribution and version:
RHEL 8.10
Other relevant data:
Actions::Pulp3::ContentGuard::Refresh
Input:
{"smart_proxy_id"=>2, "remote_user"=>"admin", "remote_cp_user"=>"admin", "current_request_id"=>"3b659f17-dd9c-470b-98ba-7da05446cb41", "current_timezone"=>"Europe/Vienna", "current_organization_id"=>1, "current_location_id"=>nil, "current_user_id"=>63}
Output:
{}
Exception:
PulpCertguardClient::ApiError: Error message: the server returns an error HTTP status code: 403 Response headers: {"date"=>"Tue, 24 Sep 2024 09:04:38 GMT", "server"=>"gunicorn", "content-type"=>"application/json", "vary"=>"Accept,Cookie", "allow"=>"GET, POST, HEAD, OPTIONS", "x-frame-options"=>"DENY", "content-length"=>"58", "x-content-type-options"=>"nosniff", "referrer-policy"=>"same-origin", "cross-origin-opener-policy"=>"same-origin", "correlation-id"=>"3b659f17-dd9c-470b-98ba-7da05446cb41", "access-control-expose-headers"=>"Correlation-ID", "via"=>"1.1 capsulegraz.wamas.com"} Response body: {"detail":"Authentication credentials were not provided."}
Backtrace:
/usr/share/gems/gems/pulp_certguard_client-3.49.6/lib/pulp_certguard_client/api_client.rb:83:in `call_api' /usr/share/gems/gems/pulp_certguard_client-3.49.6/lib/pulp_certguard_client/api/contentguards_rhsm_api.rb:250:in `list_with_http_info' /usr/share/gems/gems/pulp_certguard_client-3.49.6/lib/pulp_certguard_client/api/contentguards_rhsm_api.rb:168:in `list' /usr/share/gems/gems/katello-4.13.1/app/services/katello/pulp3/api/content_guard.rb:65:in `list' /usr/share/gems/gems/katello-4.13.1/app/services/katello/pulp3/api/content_guard.rb:32:in `refresh' /usr/share/gems/gems/katello-4.13.1/app/lib/actions/pulp3/content_guard/refresh.rb:10:in `run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/action.rb:590:in `block (3 levels) in execute_run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:28:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware.rb:20:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware.rb:33:in `run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:24:in `call' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:28:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware.rb:20:in `pass' /usr/share/gems/gems/katello-4.13.1/app/lib/actions/middleware/remote_action.rb:16:in `block in run' /usr/share/gems/gems/katello-4.13.1/app/lib/actions/middleware/remote_action.rb:40:in `block in as_remote_user' /usr/share/gems/gems/katello-4.13.1/app/models/katello/concerns/user_extensions.rb:21:in `cp_config' /usr/share/gems/gems/katello-4.13.1/app/lib/actions/middleware/remote_action.rb:27:in `as_cp_user' /usr/share/gems/gems/katello-4.13.1/app/lib/actions/middleware/remote_action.rb:39:in `as_remote_user' /usr/share/gems/gems/katello-4.13.1/app/lib/actions/middleware/remote_action.rb:16:in `run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:24:in `call' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:28:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware.rb:20:in `pass' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/rails_executor_wrap.rb:14:in `block in run' /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/execution_wrapper.rb:91:in `wrap' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/rails_executor_wrap.rb:13:in `run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:24:in `call' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:28:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware.rb:20:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/action/progress.rb:29:in `with_progress_calculation' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/action/progress.rb:15:in `run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:24:in `call' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:28:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware.rb:20:in `pass' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/load_setting_values.rb:20:in `run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:24:in `call' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:28:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware.rb:20:in `pass' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_request_id.rb:15:in `block in run' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_request_id.rb:52:in `restore_current_request_id' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_request_id.rb:15:in `run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:24:in `call' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:28:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware.rb:20:in `pass' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_timezone.rb:15:in `block in run' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_timezone.rb:44:in `restore_curent_timezone' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_timezone.rb:15:in `run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:24:in `call' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:28:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware.rb:20:in `pass' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `block in run' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_taxonomies.rb:45:in `restore_current_taxonomies' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_taxonomies.rb:15:in `run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:24:in `call' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:28:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware.rb:20:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware.rb:33:in `run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:24:in `call' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:28:in `pass' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware.rb:20:in `pass' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_user.rb:15:in `block in run' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_user.rb:54:in `restore_curent_user' /usr/share/gems/gems/foreman-tasks-9.1.1/app/lib/actions/middleware/keep_current_user.rb:15:in `run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/stack.rb:24:in `call' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/middleware/world.rb:31:in `execute' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/action.rb:589:in `block (2 levels) in execute_run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/action.rb:588:in `catch' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/action.rb:588:in `block in execute_run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/action.rb:491:in `block in with_error_handling' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/action.rb:491:in `catch' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/action.rb:491:in `with_error_handling' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/action.rb:583:in `execute_run' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/action.rb:304:in `execute' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:18:in `block (2 levels) in execute' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/execution_plan/steps/abstract.rb:168:in `with_meta_calculation' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:17:in `block in execute' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:32:in `open_action' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:16:in `execute' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/director.rb:70:in `execute' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/executors/sidekiq/worker_jobs.rb:12:in `block (2 levels) in perform' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/executors.rb:18:in `run_user_code' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/executors/sidekiq/worker_jobs.rb:10:in `block in perform' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/executors/sidekiq/worker_jobs.rb:26:in `with_telemetry' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/executors/sidekiq/worker_jobs.rb:9:in `perform' /usr/share/gems/gems/dynflow-1.8.4/lib/dynflow/executors/sidekiq/serialization.rb:28:in `perform' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:202:in `execute_job' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:170:in `block (2 levels) in process' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/middleware/chain.rb:172:in `invoke' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:169:in `block in process' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/job_retry.rb:113:in `local' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq.rb:44:in `block in <module:Sidekiq>' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:263:in `stats' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/job_logger.rb:13:in `call' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/job_retry.rb:80:in `global' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:124:in `block in dispatch' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/job_logger.rb:39:in `prepare' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:123:in `dispatch' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:168:in `process' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:78:in `process_one' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:68:in `run' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/component.rb:8:in `watchdog' /usr/share/gems/gems/sidekiq-6.5.12/lib/sidekiq/component.rb:17:in `block in safe_thread' /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
output from foreman rake console:
root@foreman01# (git)-[master] # cat << EOF | foreman-rake console
capsule = SmartProxy.find_by_name('capsulegraz.example.com')
pp capsule.capabilities(::SmartProxy::PULP3_FEATURE)
pp capsule.feature_details
smart_proxy_helper = ::Katello::SmartProxyHelper.new(capsule)
pp smart_proxy_helper.unsyncable_content_types
EOF
Loading production environment (Rails 6.1.7.8)
Switch to inspect mode.
capsule = SmartProxy.find_by_name('capsulegraz.example.com')
#<SmartProxy id: 2, name: "capsulegraz.example.com", url: "https://capsulegraz.example.com:9090", created_at: "2022-02-25 13:10:59.096159000 +0000", updated_at: "2024-08-28 12:31:35.401983000 +0000", pubkey: nil, expired_logs: "167083749...
pp capsule.capabilities(::SmartProxy::PULP3_FEATURE)
[]
[]
pp capsule.feature_details
{"Pulpcore"=>
{:settings=>
{"pulp_url"=>"https://capsulegraz.example.com",
"mirror"=>true,
"content_app_url"=>"https://capsulegraz.example.com/pulp/content",
"username"=>nil,
"password"=>nil,
"client_authentication"=>["client_certificate"],
"rhsm_url"=>"https://capsulegraz.example.com:443/rhsm"},
:capabilities=>[]},
"Logs"=>{:settings=>{}, :capabilities=>[]}}
{"Pulpcore"=>{:settings=>{"pulp_url"=>"https://capsulegraz.example.com", "mirror"=>true, "content_app_url"=>"https://capsulegraz.example.com/pulp/content", "username"=>nil, "password"=>nil, "client_authentication"=>["client_certificate"], "rhsm_url"=>"https://capsulegraz.example.com:443/rhsm"}, :capabilities=>[]}, "Logs"=>{:settings=>{}, :capabilities=>[]}}
smart_proxy_helper = ::Katello::SmartProxyHelper.new(capsule)
#<Katello::SmartProxyHelper:0x000055b99e3f76b0 @smart_proxy=#<SmartProxy id: 2, name: "capsulegraz.example.com", url: "https://capsulegraz.example.com:9090", created_at: "2022-02-25 13:10:59.096159000 +0000", updated_at: "2024-08-28 12:3...
pp smart_proxy_helper.unsyncable_content_types
["yum"]
["yum"]
root@capsulegraz# (git)-[master] # foreman-installer --help | grep yum
--foreman-proxy-content-enable-yum Enable the RPM content feature. This allows syncing, managing and serving RPM content to be consumed by package managers like yum and dnf. (current: true)