Project

General

Profile

Actions

Bug #11578

closed

Unable to delete host

Added by Sean Sellers about 9 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Orchestration
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Deleting a host fails with the message:

RuntimeError: Executing dynflow action inside a transaction is not a good idea

ran foreman-rake katello:clean_backend_objects
ran katello-service restart

both completed successfully, but issue persists.

Action:

Actions::Katello::System::HostDestroy

Input:

{"managed"=>{"id"=>248, "name"=>"d-etcd03.gld.dreamworks.net"},
"host_id"=>248,
"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.4/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.4/app/lib/actions/middleware/keep_locale.rb:27:in `block in finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.4/app/lib/actions/middleware/keep_locale.rb:34:in `with_locale'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.2.4/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 2 (1 open1 closed)

Related to Katello - Bug #10722: Can not delete hostResolved06/05/2015Actions
Related to foreman-tasks - Bug #11929: problems with open transactions stopping host delete.New09/22/2015Actions
Actions #1

Updated by Sean Sellers about 9 years ago

Installed Packages

candlepin-0.9.45-1.el6.noarch
candlepin-common-1.0.22-1.el6.noarch
candlepin-selinux-0.9.45-1.el6.noarch
candlepin-tomcat6-0.9.45-1.el6.noarch
elasticsearch-0.90.10-7.el6.noarch
katello-2.2.1-0.el6.noarch
katello-certs-tools-2.0.1-1.el6.noarch
katello-common-2.2.1-0.el6.noarch
katello-debug-2.2.1-0.el6.noarch
katello-default-ca-1.0-1.noarch
katello-installer-2.2.3-1.el6.noarch
katello-installer-base-2.2.3-1.el6.noarch
katello-repos-2.2.1-1.el6.noarch
katello-selinux-2.2.1-1.el6.noarch
katello-server-ca-1.0-1.noarch
katello-service-2.2.1-0.el6.noarch
kirk.gld.dreamworks.net-qpid-broker-1.0-1.noarch
kirk.gld.dreamworks.net-qpid-client-cert-1.0-1.noarch
kirk.gld.dreamworks.net-qpid-router-client-1.0-1.noarch
kirk.gld.dreamworks.net-qpid-router-server-1.0-1.noarch
libqpid-dispatch-0.4-4.el6.x86_64
m2crypto-0.21.1.pulp-8.el6sat.x86_64
mod_wsgi-3.4-2.pulp.el6.x86_64
pulp-docker-plugins-0.2.2-1.el6.noarch
pulp-katello-0.4-1.el6.noarch
pulp-nodes-common-2.6.0-1.el6.noarch
pulp-nodes-parent-2.6.0-1.el6.noarch
pulp-puppet-plugins-2.6.0-1.el6.noarch
pulp-puppet-tools-2.6.0-1.el6.noarch
pulp-rpm-plugins-2.6.0-1.el6.noarch
pulp-selinux-2.6.0-1.el6.noarch
pulp-server-2.6.0-1.el6.noarch
python-gofer-qpid-2.5.3-1.el6.noarch
python-isodate-0.5.0-4.pulp.el6.noarch
python-kombu-3.0.24-5.pulp.el6.noarch
python-pulp-agent-lib-2.6.0-1.el6.noarch
python-pulp-bindings-2.6.0-1.el6.noarch
python-pulp-common-2.6.0-1.el6.noarch
python-pulp-docker-common-0.2.2-1.el6.noarch
python-pulp-puppet-common-2.6.0-1.el6.noarch
python-pulp-rpm-common-2.6.0-1.el6.noarch
python-qpid-0.30-7.el6.noarch
python-qpid-qmf-0.30-5.el6.x86_64
qpid-cpp-client-0.30-7.proton.0.9.el6.x86_64
qpid-cpp-client-devel-0.30-7.proton.0.9.el6.x86_64
qpid-cpp-server-0.30-7.proton.0.9.el6.x86_64
qpid-cpp-server-linearstore-0.30-7.proton.0.9.el6.x86_64
qpid-dispatch-router-0.4-4.el6.x86_64
qpid-proton-c-0.9-3.el6.x86_64
qpid-qmf-0.30-5.el6.x86_64
qpid-tools-0.30-4.el6.noarch
ruby193-rubygem-katello-2.2.4-1.el6.noarch
ruby193-rubygem-qpid_messaging-0.30.0-1.el6.x86_64
rubygem-hammer_cli_katello-0.0.14-1.el6.noarch
rubygem-smart_proxy_pulp-1.0.1-1.el6.noarch
Actions #2

Updated by Sean Sellers about 9 years ago

Is there a "dirty" way to remove a host from the database? I'm not having much luck finding any resolution to this issue.

Actions #3

Updated by Eric Helms about 9 years ago

  • Category set to Orchestration
  • Translation missing: en.field_release set to 77
  • Triaged changed from No to Yes
Actions #4

Updated by Stephen Benjamin about 9 years ago

  • Translation missing: en.field_release changed from 77 to 78
Actions #5

Updated by Marek Hulán almost 9 years ago

  • Related to Bug #10722: Can not delete host added
Actions #6

Updated by alvin starr almost 9 years ago

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

Updated by Eric Helms over 8 years ago

  • Translation missing: en.field_release changed from 78 to 113
Actions #8

Updated by Justin Sherrill over 8 years ago

  • Translation missing: en.field_release changed from 113 to 150
Actions #9

Updated by Justin Sherrill over 8 years ago

  • Translation missing: en.field_release changed from 150 to 144
Actions #10

Updated by Eric Helms over 8 years ago

  • Translation missing: en.field_release changed from 144 to 168
Actions #11

Updated by Eric Helms over 8 years ago

  • Status changed from New to Resolved
  • Translation missing: en.field_release changed from 168 to 166

Given how much has changed in this area of code and functionality setting to resolved. If you see this with Katello 3.0+ please re-open.

Actions

Also available in: Atom PDF