Project

General

Profile

Actions

Bug #10722

closed

Can not delete host

Added by Zailo Leite almost 9 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
Hosts
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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'


Related issues 3 (1 open2 closed)

Related to Katello - Bug #11578: Unable to delete hostResolved08/26/2015Actions
Related to foreman-tasks - Bug #11929: problems with open transactions stopping host delete.New09/22/2015Actions
Has duplicate foreman-tasks - Bug #16121: Not able to delete the host from katelloDuplicate08/16/2016Actions
Actions #1

Updated by Eric Helms almost 9 years ago

  • translation missing: en.field_release set to 55
  • Triaged changed from No to Yes
Actions #2

Updated by Zailo Leite almost 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.

Actions #3

Updated by Eric Helms almost 9 years ago

  • translation missing: en.field_release changed from 55 to 61
Actions #4

Updated by Yves Degauquier almost 9 years ago

I have the same message, but for that host there is no record in fact_values...

Actions #5

Updated by Eric Helms over 8 years ago

  • translation missing: en.field_release changed from 61 to 31
Actions #6

Updated by Eric Helms over 8 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 ?

Actions #7

Updated by Stephen Benjamin over 8 years ago

  • translation missing: en.field_release changed from 31 to 70

Mass move to 2.4.0

Actions #8

Updated by Michael Bassler over 8 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

Actions #9

Updated by alvin starr over 8 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.

Actions #10

Updated by Marek Hulán over 8 years ago

  • Related to Bug #11578: Unable to delete host added
Actions #11

Updated by alvin starr over 8 years ago

  • Related to Bug #11929: problems with open transactions stopping host delete. added
Actions #12

Updated by Justin Sherrill over 8 years ago

  • translation missing: en.field_release changed from 70 to 86
Actions #13

Updated by Eric Helms almost 8 years ago

  • translation missing: en.field_release changed from 86 to 144
Actions #14

Updated by Eric Helms almost 8 years ago

  • translation missing: en.field_release deleted (144)
Actions #15

Updated by Justin Sherrill almost 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?

Actions #16

Updated by Ivan Necas over 7 years ago

  • Has duplicate Bug #16121: Not able to delete the host from katello added
Actions

Also available in: Atom PDF