Errata install giving Executing dynflow action inside a transaction is not a good idea

Problem: Applying errata to the host gives: Executing dynflow action inside a transaction is not a good idea

Expected outcome: Errata applied

Foreman and Proxy versions: Foreman and proxy versions 1.21.3,

Foreman and Proxy plugin versions:

Other relevant data:
Getting this error a lot when trying to push out packages to hosts. In the dynflow console, it is showing this action as failing:

Actions::Katello::Host::Erratum::Install

I can skip it, press resume, and it completes, but obviously that isn’t ideal. Can you give me any pointers on where to look?

Full log:

/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/models/foreman_tasks/concerns/action_triggering.rb:145:in `ensure_not_in_transaction!'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/models/foreman_tasks/concerns/action_triggering.rb:126:in `dynflow_task_wrap'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/models/foreman_tasks/concerns/action_triggering.rb:42:in `update'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.1/app/lib/actions/katello/host/erratum/install.rb:46:in `finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/action.rb:559:in `block (2 levels) in execute_finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/lib/actions/middleware/rails_executor_wrap.rb:20:in `block in finalize'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/execution_wrapper.rb:87:in `wrap'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/lib/actions/middleware/rails_executor_wrap.rb:19:in `finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/action/progress.rb:30:in `with_progress_calculation'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/action/progress.rb:22:in `finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.1/app/lib/actions/middleware/keep_locale.rb:15:in `block in finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.1/app/lib/actions/middleware/keep_locale.rb:22:in `with_locale'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.11.1/app/lib/actions/middleware/keep_locale.rb:15:in `finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/lib/actions/middleware/keep_current_timezone.rb:19:in `block in finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/lib/actions/middleware/keep_current_timezone.rb:44:in `restore_curent_timezone'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/lib/actions/middleware/keep_current_timezone.rb:19:in `finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/lib/actions/middleware/keep_current_user.rb:19:in `block in finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/lib/actions/middleware/keep_current_user.rb:43:in `restore_curent_user'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/lib/actions/middleware/keep_current_user.rb:19:in `finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/lib/actions/middleware/keep_current_taxonomies.rb:19:in `block in finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/lib/actions/middleware/keep_current_taxonomies.rb:44:in `restore_current_taxonomies'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.14.5/app/lib/actions/middleware/keep_current_taxonomies.rb:19:in `finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:39:in `finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/action.rb:558:in `block in execute_finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/action.rb:450:in `block in with_error_handling'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/action.rb:450:in `catch'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/action.rb:450:in `with_error_handling'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/action.rb:557:in `execute_finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/action.rb:277:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:17:in `block (2 levels) in execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/execution_plan/steps/abstract.rb:162:in `with_meta_calculation'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:16:in `block in execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:30:in `open_action'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:15:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/director/sequential_manager.rb:68:in `run_step'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/director/sequential_manager.rb:53:in `dispatch'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/director/sequential_manager.rb:60:in `block in run_in_sequence'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/director/sequential_manager.rb:60:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/director/sequential_manager.rb:60:in `all?'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/director/sequential_manager.rb:60:in `run_in_sequence'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/director/sequential_manager.rb:49:in `dispatch'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/director/sequential_manager.rb:27:in `block in finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:47:in `finalize_phase'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:47:in `finalize_phase'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:47:in `finalize_phase'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:47:in `finalize_phase'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:47:in `finalize_phase'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:47:in `finalize_phase'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:47:in `finalize_phase'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:47:in `finalize_phase'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware.rb:18:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/common/transaction.rb:16:in `block in rollback_on_error'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:254:in `block in transaction'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/opt/rh/rh-ruby25/root/usr/share/ruby/monitor.rb:226:in `mon_synchronize'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:254:in `transaction'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:212:in `transaction'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/transaction_adapters/active_record.rb:5:in `transaction'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/common/transaction.rb:15:in `rollback_on_error'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/common/transaction.rb:9:in `finalize_phase'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/director/sequential_manager.rb:26:in `finalize'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/director.rb:67:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/executors/parallel/worker.rb:14:in `block in on_message'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/executors.rb:12:in `run_user_code'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/executors/parallel/worker.rb:13:in `on_message'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/context.rb:46:in `on_envelope'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/executes_context.rb:7:in `on_envelope'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-1.2.1/lib/dynflow/actor.rb:26:in `on_envelope'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/awaits.rb:15:in `on_envelope'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/sets_results.rb:14:in `on_envelope'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/buffer.rb:38:in `process_envelope'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/buffer.rb:31:in `process_envelopes?'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/buffer.rb:20:in `on_envelope'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/termination.rb:55:in `on_envelope'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/removes_child.rb:10:in `on_envelope'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/abstract.rb:25:in `pass'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/behaviour/sets_results.rb:14:in `on_envelope'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/core.rb:162:in `process_envelope'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/core.rb:96:in `block in on_envelope'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/core.rb:119:in `block (2 levels) in schedule_execution'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/synchronization/mutex_lockable_object.rb:41:in `block in synchronize'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/synchronization/mutex_lockable_object.rb:41:in `synchronize'
/opt/theforeman/tfm/root/usr/share/gems/gems/concurrent-ruby-edge-0.4.1/lib-edge/concurrent/actor/core.rb:116:in `block in schedule_execution'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/serialized_execution.rb:18:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/serialized_execution.rb:96:in `work'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/serialized_execution.rb:77:in `block in call_job'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/ruby_thread_pool_executor.rb:348:in `run_task'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/ruby_thread_pool_executor.rb:337:in `block (3 levels) in create_worker'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `loop'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/ruby_thread_pool_executor.rb:320:in `block (2 levels) in create_worker'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `catch'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/concurrent-ruby-1.1.4/lib/concurrent/executor/ruby_thread_pool_executor.rb:319:in `block in create_worker'
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

perhaps @tasks team could comment?

It looks like there is some dynflow hook attached to the host update event. I would be curious about the list of plugins enabled in this setup, because it looks like there might be some incompatible combination.

Here you go:

bastion Bastion provides a UI library of AngularJS based components designed to integrate and work with Foreman. Eric D Helms and Walden Raines 6.1.16
foreman-tasks The goal of this plugin is to unify the way of showing task statuses across the Foreman instance. It defines Task model for keeping the information about the tasks and Lock for assigning the tasks to resources. The locking allows dealing with preventing multiple colliding tasks to be run on the same resource. It also optionally provides Dynflow infrastructure for using it for managing the tasks. Ivan Nečas 0.14.5
foreman_ansible Ansible integration with Foreman Daniel Lobato Garcia 2.3.4
foreman_bootdisk Plugin for Foreman that creates iPXE-based boot disks to provision hosts without the need for PXE infrastructure. Dominic Cleal 14.0.0
foreman_chef Foreman extensions that are required for better Chef integration. Marek Hulan 0.8.1
foreman_cockpit This plugin adds a tab to see your host’s Cockpit components, such as console, journal, and networking if the host has Cockpit installed. Daniel Lobato Garcia 2.0.3
foreman_dhcp_browser Plugin for Foreman to browse and add/edit/delete DHCP leases independent of Foreman’s host creation Ohad Levy 0.0.8
foreman_discovery MaaS Discovery Plugin engine for Foreman Aditi Puntambekar, alongoldboim, Alon Goldboim, amirfefer, Amit Karsale, Amos Benari, Avi Sharvit, Bryan Kearney, bshuster, Daniel Lobato, Daniel Lobato Garcia, Daniel Lobato García, Danny Smit, David Davis, Djebran Lezzoum, Dominic Cleal, Eric D. Helms, Ewoud Kohl van Wijngaarden, Frank Wall, Greg Sutcliffe, ChairmanTubeAmp, Ido Kanner, imriz, Imri Zvik, Joseph Mitchell Magen, June Zhang, kgaikwad, Lars Berntzon, ldjebran, Lukas Zapletal, Lukáš Zapletal, Marek Hulan, Marek Hulán, Martin Bačovský, Matt Jarvis, Michael Moll, Nick, odovzhenko, Ohad Levy, Ondrej Prazak, Ori Rabin, orrabin, Partha Aji, Petr Chalupa, Phirince Philip, Rahul Bajaj, Robert Antoni Buj Gelonch, Scubafloyd, Sean O’Keeffe, Sebastian Gräßl, Shimon Shtein, Shlomi Zadok, Stephen Benjamin, Swapnil Abnave, Thomas Gelf, Timo Goebel, Tomas Strych, Tom Caspy, Tomer Brisker, and Yann Cézard 14.0.1
foreman_docker Provision and manage Docker containers and images from Foreman. Daniel Lobato, Amos Benari 4.1.0
foreman_expire_hosts This Plugin will add new column expired_on to hosts to limit the lifetime of a host. Nagarjuna Rachaneni and Timo Goebel 5.1.0
foreman_monitoring Foreman plugin for monitoring system integration. Timo Goebel 1.0.1
foreman_openscap Foreman plug-in for managing security compliance reports slukasik@redhat.com 0.12.3
foreman_remote_execution A plugin bringing remote execution to the Foreman, completing the config management functionality with remote management functionality. Foreman Remote Execution team 1.7.0
foreman_userdata This plug-in adds support for serving user-data for cloud-init to The Foreman. Timo Goebel 0.1.0
foreman_xen Provision and manage XEN Server from Foreman. Pavel Nemirovsky, Michal Piotrowski, and Avi Israeli 0.7.1
katello Content and Subscription Management plugin for Foreman N/A 3.11.1
puppetdb_foreman Disable hosts on PuppetDB after they are deleted or built in Foreman. Follow https://github.com/theforeman/puppetdb_foreman and raise an issue/submit a pull request if you need extra functionality. You can also find some help in #theforeman IRC channel on Freenode. Daniel Lobato Garcia 5.0.0

Will try to remove some of them that we don’t really need just yet.

And these are the compute plugins we’re using:

Provider Status
Docker Installed
EC2 Installed
Google Not Installed
Libvirt Installed
OpenStack Installed
oVirt Not Installed
Rackspace Not Installed
VMware Installed
Xenserver Installed

So I removed puppetdb, discovery, and bootdisk plugins to start with.

Installing a package actually does work, but comes back as a warning with the same error as originally.

Dynflow console shows this:

Id: a6f8529f-81e0-4217-878c-e793361a9d78

Label: Actions::Katello::Host::Package::Install

Status: stopped

Result: warning

Started at: 2019-05-22 12:46:45 UTC

Ended at: 2019-05-22 12:47:15 UTC

4: Actions::Pulp::Consumer::ContentInstall (success) [ 0.27s / 0.04s ]
5: Actions::Katello::Host::Package::Install (skipped) [ 0.03s / 0.03s ]

Is this thread stale? Has this issue been resolved? If so, what was the solution? The issue that I see at the GUI is “Executing dynflow action inside a transaction is not a good idea”, but that is all I get.

Remote execution works, but not without also giving me this false error. If I attempt to install, say, Lynx, it works with no issues on the client side, but the GUI still tells me that it encountered this error. It is very strange.