Actions
Bug #36520
closedsyncing a smart proxy fails with ActiveRecord::RecordNotFound Couldn't find SmartProxy with 'id'=2
Status:
Closed
Priority:
Normal
Assignee:
Category:
Foreman Proxy Content
Target version:
Description
Morning,
seems to be a ghost from the past: https://projects.theforeman.org/issues/18656 .
This error still occurs while pushing content into a repository via:
hammer repository upload-content --organization <org> --product <product> --name <reponame> --path <directory_path_to_rpms>
Katello 4.8.1 w/ Foreman 3.6.1
External Smart Proxy Setup
Version: 3.6.1
Active features
Container_Gateway
Discovery
Logs
Pulpcore
Registration
Templates
TFTP
User Setup: User created for API use only, selected role is only "sync_repositories"
Steps to reproduce:
Push Content into Repo via above cmd.
Frontend immediatly reports "paused tasks" afterwards.
Name:
Synchronize smart proxy 'externalsmartproxy.domain.tld'
Actions::Katello::CapsuleContent::Sync {"smart_proxy"=>{"id"=>2, "name"=>"externalsmartproxy.domain.tld"}, "services_checked"=>["pulp3"], "smart_proxy_id"=>2, "current_request_id"=>"87eb0873-ee14-45b9-adcf-4b9aad15b76e", "current_timezone"=>"UTC", "current_organization_id"=>nil, "current_location_id"=>nil, "current_user_id"=>18}
Exception:
ActiveRecord::RecordNotFound: Couldn't find SmartProxy with 'id'=2 [WHERE (1=0)]
Backtrace:
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/finder_methods.rb:357:in `raise_record_not_found_exception!' /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/finder_methods.rb:476:in `find_one' /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/finder_methods.rb:458:in `find_with_ids' /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/finder_methods.rb:69:in `find' /usr/share/gems/gems/katello-4.8.1/app/lib/actions/katello/capsule_content/sync.rb:47:in `finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:604:in `block (2 levels) in execute_finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/rails_executor_wrap.rb:20:in `block in finalize' /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/execution_wrapper.rb:91:in `wrap' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/rails_executor_wrap.rb:19:in `finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action/progress.rb:31:in `with_progress_calculation' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action/progress.rb:23:in `finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/load_setting_values.rb:25:in `finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_request_id.rb:19:in `block in finalize' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_request_id.rb:52:in `restore_current_request_id' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_request_id.rb:19:in `finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_timezone.rb:19:in `block in finalize' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_timezone.rb:44:in `restore_curent_timezone' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_timezone.rb:19:in `finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_taxonomies.rb:19:in `block in finalize' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_taxonomies.rb:45:in `restore_current_taxonomies' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_taxonomies.rb:19:in `finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:40:in `finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_user.rb:25:in `block in finalize' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_user.rb:54:in `restore_curent_user' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_user.rb:25:in `finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/world.rb:31:in `execute' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:603:in `block in execute_finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:483:in `block in with_error_handling' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:483:in `catch' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:483:in `with_error_handling' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:602:in `execute_finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/action.rb:296:in `execute' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:18:in `block (2 levels) in execute' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract.rb:167:in `with_meta_calculation' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:17:in `block in execute' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:32:in `open_action' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:16:in `execute' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/director/sequential_manager.rb:78:in `run_step' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/director/sequential_manager.rb:63:in `dispatch' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/director/sequential_manager.rb:70:in `block in run_in_sequence' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/director/sequential_manager.rb:70:in `all?' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/director/sequential_manager.rb:70:in `run_in_sequence' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/director/sequential_manager.rb:59:in `dispatch' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/director/sequential_manager.rb:28:in `block in finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:48:in `finalize_phase' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:48:in `finalize_phase' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:48:in `finalize_phase' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:48:in `finalize_phase' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:48:in `finalize_phase' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:48:in `finalize_phase' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/common/transaction.rb:17:in `block in rollback_on_error' /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction' /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction' /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize' /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt' /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize' /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt' /usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize' /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction' /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction' /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/transactions.rb:209:in `transaction' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/transaction_adapters/active_record.rb:6:in `transaction' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/common/transaction.rb:16:in `rollback_on_error' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/common/transaction.rb:10:in `finalize_phase' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:27:in `pass' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware.rb:19:in `pass' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_user.rb:29:in `block in finalize_phase' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_user.rb:54:in `restore_curent_user' /usr/share/gems/gems/foreman-tasks-7.2.1/app/lib/actions/middleware/keep_current_user.rb:29:in `finalize_phase' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/stack.rb:23:in `call' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/middleware/world.rb:31:in `execute' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/director/sequential_manager.rb:27:in `finalize' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/director.rb:143:in `execute' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/worker_jobs.rb:11:in `block (2 levels) in perform' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors.rb:18:in `run_user_code' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/worker_jobs.rb:9:in `block in perform' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/worker_jobs.rb:25:in `with_telemetry' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/worker_jobs.rb:8:in `perform' /usr/share/gems/gems/dynflow-1.6.8/lib/dynflow/executors/sidekiq/serialization.rb:27:in `perform' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:196:in `execute_job' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:164:in `block (2 levels) in process' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/middleware/chain.rb:133:in `invoke' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:163:in `block in process' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/job_retry.rb:112:in `local' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq.rb:39:in `block in <module:Sidekiq>' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:257:in `stats' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/job_logger.rb:13:in `call' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/job_retry.rb:79:in `global' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:124:in `block in dispatch' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/logger.rb:11:in `with' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/job_logger.rb:33:in `prepare' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:123:in `dispatch' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:162:in `process' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:78:in `process_one' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/processor.rb:68:in `run' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/util.rb:43:in `watchdog' /usr/share/gems/gems/sidekiq-6.3.1/lib/sidekiq/util.rb:52: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'
Updated by Jeremy Lenz over 1 year ago
- Target version set to Katello 4.11.0
- Triaged changed from No to Yes
Updated by The Foreman Bot over 1 year ago
- Status changed from New to Ready For Testing
- Assignee set to Samir Jha
- Pull request https://github.com/Katello/katello/pull/10651 added
Updated by The Foreman Bot over 1 year ago
- Fixed in Releases Katello 4.10.0 added
Updated by Samir Jha over 1 year ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|f9ce129c658d6405c5d3b47dcd5cb63b27417cff.
Updated by Ian Ballou 11 months ago
- Subject changed from syncing a capsule fails with ActiveRecord::RecordNotFound Couldn't find SmartProxy with 'id'=2 to syncing a smart proxy fails with ActiveRecord::RecordNotFound Couldn't find SmartProxy with 'id'=2
Actions