Bug #10722
closedCan not delete host
Description
Attempting to delete a host results in a paused task with the message:
RuntimeError: Executing dynflow action inside a transaction is not a good idea
Any way I can force it?
================================
Task:
Id: 0e0e4676-9ad4-4979-a8b4-e84ccc970fcc
Label: Actions::Katello::System::HostDestroy
Name: Destroy Host
Owner: xxxxxx
Started at: 2015-06-05 21:42:30 UTC
Ended at:
State: paused
Result: error
Params:
Errors:
Executing dynflow action inside a transaction is not a good idea
Action:
Actions::Katello::System::HostDestroy
Input: {"managed"=>{"id"=>2, "name"=>"satsix-test"}, "host_id"=>2, "locale"=>"en"}
Output: {}
Exception:
RuntimeError: Executing dynflow action inside a transaction is not a good idea
Backtrace:
/opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.13/app/models/foreman_tasks/concerns/action_triggering.rb:122:in `ensure_not_in_transaction!'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.13/app/models/foreman_tasks/concerns/action_triggering.rb:109:in `dynflow_task_wrap'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman-tasks-0.6.13/app/models/foreman_tasks/concerns/action_triggering.rb:34:in `destroy'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.1/app/lib/actions/katello/system/host_destroy.rb:33:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/action.rb:503:in `block (2 levels) in execute_finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware/stack.rb:26:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/action/progress.rb:30:in `with_progress_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/action/progress.rb:22:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.1/app/lib/actions/middleware/keep_locale.rb:27:in `block in finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.1/app/lib/actions/middleware/keep_locale.rb:34:in `with_locale'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.1/app/lib/actions/middleware/keep_locale.rb:27:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/action.rb:502:in `block in execute_finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/action.rb:396:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/action.rb:396:in `block in with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/action.rb:396:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/action.rb:396:in `with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/action.rb:501:in `execute_finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/action.rb:256:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:9:in `block (2 levels) in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/execution_plan/steps/abstract.rb:155:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/execution_plan/steps/abstract.rb:155:in `with_meta_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:8:in `block in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:22:in `open_action'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:7:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/executors/parallel/sequential_manager.rb:72:in `run_step'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/executors/parallel/sequential_manager.rb:57:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `block in run_in_sequence'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `all?'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `run_in_sequence'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/executors/parallel/sequential_manager.rb:53:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/executors/parallel/sequential_manager.rb:28:in `block (2 levels) in finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware/stack.rb:26:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware.rb:41:in `finalize_phase'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware.rb:41:in `finalize_phase'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/executors/parallel/sequential_manager.rb:27:in `block in finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/transaction_adapters/active_record.rb:5:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/executors/parallel/sequential_manager.rb:24:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/executors/parallel/worker.rb:23:in `block in on_message'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:859:in `block in assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `tap'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:138:in `match_value'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:116:in `block in match'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `match'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/executors/parallel/worker.rb:17:in `on_message'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/micro_actor.rb:82:in `on_envelope'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/micro_actor.rb:72:in `receive'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/micro_actor.rb:99:in `block (2 levels) in run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/micro_actor.rb:99:in `loop'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/micro_actor.rb:99:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/micro_actor.rb:99:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/micro_actor.rb:99:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.8/lib/dynflow/micro_actor.rb:13:in `block in initialize'
/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
Updated by Eric Helms over 9 years ago
- Translation missing: en.field_release set to 55
- Triaged changed from No to Yes
Updated by Zailo Leite over 9 years ago
More info: tables fact_values, nics had bad rows
Editing an interface inserts two spaces in every blank field in the nics table in violation of the schema. From that point on the record can not be edited anymore.
Updated by Eric Helms over 9 years ago
- Translation missing: en.field_release changed from 55 to 61
Updated by Yves Degauquier over 9 years ago
I have the same message, but for that host there is no record in fact_values...
Updated by Eric Helms over 9 years ago
- Translation missing: en.field_release changed from 61 to 31
Updated by Eric Helms over 9 years ago
- Status changed from New to Need more information
Are you attempting to delete a host or content host? In other words, what page are you on when you are trying to delete ?
Updated by Stephen Benjamin over 9 years ago
- Translation missing: en.field_release changed from 31 to 70
Mass move to 2.4.0
Updated by Michael Bassler over 9 years ago
I believe this issue is duplicated by:
http://projects.theforeman.org/issues/11578
I have the same issue and can confirm that it is attempting to delete from the All Hosts page. (note: Not the Content Hosts page)
I would be happy to try workarounds if there are some things that you can suggest.
Thank You
Updated by alvin starr over 9 years ago
I am running into the same problem.
It may have been because I tried to build a host that generated template errors.
I tried to clean up the config by removing the host but I was stuck.
Updated by Marek Hulán about 9 years ago
- Related to Bug #11578: Unable to delete host added
Updated by alvin starr about 9 years ago
- Related to Bug #11929: problems with open transactions stopping host delete. added
Updated by Justin Sherrill about 9 years ago
- Translation missing: en.field_release changed from 70 to 86
Updated by Eric Helms over 8 years ago
- Translation missing: en.field_release changed from 86 to 144
Updated by Eric Helms over 8 years ago
- Translation missing: en.field_release deleted (
144)
Updated by Justin Sherrill over 8 years ago
- Category set to Hosts
- Status changed from Need more information to Resolved
- Translation missing: en.field_release set to 144
I believe this was resolved in 3.0. Can you reopen if you still see the problem?
Updated by Ivan Necas over 8 years ago
- Has duplicate Bug #16121: Not able to delete the host from katello added