Project

General

Profile

Bug #14702

Improve error messages when deleting multiple host fails because of proxy errors

Added by Sachar de Vries almost 6 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Orchestration
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Received the following error when trying to delete a host: ActiveRecord::RecordNotDestroyed

2016-04-19 14:53:12 [app] [W] Action failed
 | ActiveRecord::RecordNotDestroyed: ActiveRecord::RecordNotDestroyed
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/persistence.rb:167:in `destroy!'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/has_many_association.rb:112:in `each'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/has_many_association.rb:112:in `delete_records'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/collection_association.rb:492:in `remove_records'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/collection_association.rb:485:in `block in delete_or_destroy'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/collection_association.rb:168:in `block in transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:199:in `transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:208:in `transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/collection_association.rb:167:in `transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/collection_association.rb:485:in `delete_or_destroy'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/collection_association.rb:270:in `destroy'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/collection_association.rb:208:in `destroy_all'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/has_many_association.rb:26:in `handle_dependency'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/builder/association.rb:135:in `block in add_before_destroy_callbacks'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:440:in `instance_exec'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:440:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:160:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:160:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:215:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:215:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `run_callbacks'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/callbacks.rb:292:in `destroy'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:263:in `block in destroy'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:208:in `transaction'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:326:in `with_transaction_returning_status'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:263:in `destroy'
 | /usr/share/foreman/app/controllers/hosts_controller.rb:538:in `block in submit_multiple_destroy'
 | /usr/share/foreman/app/controllers/hosts_controller.rb:538:in `delete_if'
 | /usr/share/foreman/app/controllers/hosts_controller.rb:538:in `submit_multiple_destroy'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/base.rb:189:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/rendering.rb:10:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `public_send'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in `set_timezone'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `public_send'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `run_callbacks'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/callbacks.rb:19:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/rescue.rb:29:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/notifications.rb:159:in `block in instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/notifications.rb:159:in `instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/base.rb:136:in `process'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionview-4.1.5/lib/action_view/rendering.rb:30:in `process'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal.rb:196:in `dispatch'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal.rb:232:in `block in action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:82:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:82:in `dispatch'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:50:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/journey/router.rb:71:in `block in call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/journey/router.rb:59:in `each'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/journey/router.rb:59:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:678:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.3.5/lib/apipie/static_dispatcher.rb:65:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.3.5/lib/apipie/extractor/recorder.rb:132:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.3.5/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/conditionalget.rb:35:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
 | /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/flash.rb:254:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/cookies.rb:560:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/query_cache.rb:36:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:82:in `run_callbacks'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/rack/logger.rb:38:in `call_app'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/rack/logger.rb:22:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/request_id.rb:21:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/engine.rb:514:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/application.rb:144:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/railtie.rb:194:in `public_send'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/railtie.rb:194:in `method_missing'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `block in call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `each'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `call'
 | /usr/share/gems/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
 | /usr/share/gems/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
 | /usr/share/gems/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
 | /usr/share/gems/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'

After some troubleshooting this issue was caused because foreman-proxy was unable to delete the dns records for this host, which received the following error:

D, [2016-04-19T15:24:03.898098 #11412] DEBUG -- : nsupdate: executed - server 127.0.0.1
D, [2016-04-19T15:24:03.906988 #11412] DEBUG -- : nsupdate: executed - update add foo. 86400 A 192.168.35.181
D, [2016-04-19T15:24:03.914872 #11412] DEBUG -- : nsupdate: errors
Answer:

;; ->>HEADER<<- opcode: UPDATE, status: SERVFAIL, id:  26013

;; flags: qr ra; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1

;; ZONE SECTION:

;foo.corp.            IN    SOA

;; TSIG PSEUDOSECTION:

foreman.        0    ANY    TSIG    <snip> 26013 NOERROR 0

E, [2016-04-19T15:24:03.916830 #11412] ERROR -- : Update errors: Answer:

;; ->>HEADER<<- opcode: UPDATE, status: SERVFAIL, id:  26013

;; flags: qr ra; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1

;; ZONE SECTION:

;grass.corp.            IN    SOA

;; TSIG PSEUDOSECTION:

foreman.        0    ANY    TSIG    hmac-md5.sig-alg.reg.int.<snip> NOERROR 0

D, [2016-04-19T15:24:03.917002 #11412] DEBUG -- : Update errors: Answer:

;; ->>HEADER<<- opcode: UPDATE, status: SERVFAIL, id:  26013

;; flags: qr ra; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1

;; ZONE SECTION:

;grass.corp.            IN    SOA

;; TSIG PSEUDOSECTION:

foreman.        0    ANY    TSIG    hmac-md5.sig-alg.reg.int<snip>26013 NOERROR 0

 (Proxy::Dns::Error)
/usr/share/foreman-proxy/modules/dns_nsupdate/dns_nsupdate_main.rb:79:in `nsupdate_disconnect'
/usr/share/foreman-proxy/modules/dns_nsupdate/dns_nsupdate_main.rb:32:in `do_create'
/usr/share/foreman-proxy/modules/dns_nsupdate/dns_nsupdate_main.rb:16:in `create_a_record'
/usr/share/foreman-proxy/modules/dns/dns_api.rb:21:in `POST /?'

named logs:

19-Apr-2016 15:35:27.996 update: clientx.x.x.x#53147: updating zone 'grass.corp/IN': adding an RR at 'foo' A
19-Apr-2016 15:35:27.997 general: /etc/named/foo.db.jnl: create: permission denied
19-Apr-2016 15:35:27.997 update: client x.x.x.x#53147: updating zone 'foop/IN': error: journal open failed: unexpected error

So not a foreman issue, but a more descriptive error message would be great.


Related issues

Related to Foreman - Bug #15206: Unable to Disassociate Hosts or to Remove hosts once they are supposedly disassociatedResolved2016-05-26
Related to Foreman - Bug #15768: Destroying of the host not possibleDuplicate2016-07-21
Related to Foreman - Bug #19280: Failed to destroy host on 1.15 RCFeedback2017-04-16
Has duplicate Foreman - Bug #18590: Failed to destroy the recordDuplicate2017-02-21

History

#1 Updated by Marek Hulán almost 6 years ago

  • Subject changed from ActiveRecord::RecordNotDestroyed error due to dns update issue when trying to deete a host to Improve error messages when deleting multiple host fails because of proxy errors
  • Category set to Orchestration

#2 Updated by Dominic Cleal almost 6 years ago

  • Priority changed from Low to Normal
  • Legacy Backlogs Release (now unused) set to 155

I think this is a change in behaviour, since in 1.10 (with Rails 3.2) the error would be caught and would bubble up to the UI as a flash.

1.10-stable:

2016-04-21T13:01:30 [app] [I] Started DELETE "/hosts/wstest.example.com" for 127.0.0.1 at 2016-04-21 13:01:30 +0100
2016-04-21T13:01:30 [app] [I] Processing by HostsController#destroy as HTML
2016-04-21T13:01:30 [app] [I]   Parameters: {"authenticity_token"=>"adVYEYL/s2YN4bENgzAnuwV5wjZDC2IQN2ukdulTRAw=", "id"=>"wstest.example.com"}
2016-04-21T13:01:30 [sql] [D]   User Load (0.1ms)  SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1  [["id", 24]]
...
2016-04-21T13:01:31 [sql] [D] Using host queue
2016-04-21T13:01:31 [sql] [D] Using host queue
2016-04-21T13:01:31 [app] [I] Delete the DNS PTR record for 192.168.122.137/wstest.example.com
2016-04-21T13:01:31 [app] [W] Remove Reverse DNS record for wstest.example.com task failed with the following error: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([Errno::ECONNREFUSED]: Connection refused - connect(2)) for proxy http://localhost:8443
/dns
 | ProxyAPI::ProxyException: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([Errno::ECONNREFUSED]: Connection refused - connect(2)) for proxy http://localhost:8443/dns
 | /home/dcleal/code/foreman/foreman/lib/proxy_api/dns.rb:27:in `rescue in delete'
 | /home/dcleal/code/foreman/foreman/lib/proxy_api/dns.rb:22:in `delete'
 | /home/dcleal/code/foreman/foreman/lib/net/dns/ptr_record.rb:15:in `destroy'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration/dns.rb:104:in `del_dns_ptr_record'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:168:in `execute'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:113:in `block in process'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:105:in `each'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:105:in `process'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:43:in `on_destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:460:in `_run__3625621569223200670__destroy__442775776796353431__callbacks'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_destroy_callbacks'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/callbacks.rb:254:in `destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:254:in `block in destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:208:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:254:in `destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/associations/has_many_association.rb:90:in `block in delete_records'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/associations/has_many_association.rb:90:in `each'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/associations/has_many_association.rb:90:in `delete_records'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/associations/collection_association.rb:466:in `remove_records'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/associations/collection_association.rb:459:in `block in delete_or_destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/associations/collection_association.rb:149:in `block in transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:208:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/associations/collection_association.rb:148:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/associations/collection_association.rb:459:in `delete_or_destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/associations/collection_association.rb:231:in `delete'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/associations/collection_association.rb:157:in `delete_all'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/associations/collection_proxy.rb:46:in `delete_all'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/associations/builder/has_many.rb:42:in `block in define_destroy_dependency_method'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:440:in `_run__4100763155746977097__destroy__442775776796353431__callbacks'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_destroy_callbacks'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/callbacks.rb:254:in `destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:254:in `block in destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:208:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-3.2.21/lib/active_record/transactions.rb:254:in `destroy'
 | /home/dcleal/code/foreman/foreman/app/controllers/hosts_controller.rb:115:in `destroy'
[...]
2016-04-21T13:01:31 [sql] [D] Using host queue
2016-04-21T13:01:31 [sql] [W] Rolling back due to a problem: [#<Orchestration::Task:0x0000000b631130 @name="Remove Reverse DNS record for wstest.example.com", @status="failed", @priority=1, @action=[#<Nic::Managed id: 11, mac: "52:54:00:88:73:14", ip: "192.168.122.137", 
type: "Nic::Managed", name: "wstest.example.com", host_id: 118, subnet_id: 4, domain_id: 6, attrs: {}, created_at: "2015-01-28 14:06:21", updated_at: "2015-07-21 10:55:31", provider: nil, username: nil, password: nil, virtual: false, link: true, identifier: "eth0", tag: 
"", attached_to: "", managed: true, mode: "balance-rr", attached_devices: "", bond_options: "", primary: true, provision: true, compute_attributes: {"type"=>"network", "_delete"=>"", "network"=>"default", "model"=>"virtio", "from_profile"=>"libvirt"}>, :del_dns_ptr_recor
d], @timestamp=2016-04-21 13:01:31 +0100>]
[...]
2016-04-21T13:01:31 [sql] [D]   SQL (0.2ms)  DELETE FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."id" = ?  [["id", 118]]
2016-04-21T13:01:31 [sql] [D]    (0.3ms)  rollback transaction
2016-04-21T13:01:31 [app] [I] Failed to save: Remove Reverse DNS record for wstest.example.com task failed with the following error: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([Errno::ECONNREFUSED]: Connection refused - connect(2)) for proxy http:
//localhost:8443/dns
2016-04-21T13:01:31 [app] [I] Redirected to http://0.0.0.0:3000/hosts
2016-04-21T13:01:31 [app] [I] Completed 302 Found in 887.6ms (ActiveRecord: 11.8ms)

1.11-stable:

2016-04-21T13:11:09 [app] [I] Started DELETE "/hosts/wstest.example.com" for 127.0.0.1 at 2016-04-21 13:11:09 +0100
2016-04-21T13:11:09 [app] [I] Processing by HostsController#destroy as HTML
2016-04-21T13:11:09 [app] [I]   Parameters: {"authenticity_token"=>"GZ+i/kAvvSnTwYbEAAFUqe+WTbR2O9zjAhSmzeUEIef3KZCc3T5WzQY1jbMbjCCvi3VQ/sNuYWQVIZi5ICzsVw==", "id"=>"wstest.example.com"}
2016-04-21T13:11:09 [sql] [D]   ActiveRecord::SessionStore::Session Load (0.1ms)  SELECT  "sessions".* FROM "sessions" WHERE "sessions"."session_id" = ?  ORDER BY "sessions"."id" ASC LIMIT 1  [["session_id", "a85c824d886e8f96cfd9a0d7edda0750"]]
[...]
2016-04-21T13:11:10 [sql] [D] Using host queue
2016-04-21T13:11:10 [sql] [D] Using host queue
2016-04-21T13:11:10 [app] [I] Delete the DNS PTR record for 192.168.122.137/wstest.example.com
2016-04-21T13:11:10 [app] [W] Remove Reverse DNS record for wstest.example.com task failed with the following error: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([Errno::ECONNREFUSED]: Connection refused - connect(2)) for proxy http://localhost:8443
/dns
 | ProxyAPI::ProxyException: ERF12-1261 [ProxyAPI::ProxyException]: Unable to delete DNS entry ([Errno::ECONNREFUSED]: Connection refused - connect(2)) for proxy http://localhost:8443/dns
 | /home/dcleal/code/foreman/foreman/lib/proxy_api/dns.rb:27:in `rescue in delete'
 | /home/dcleal/code/foreman/foreman/lib/proxy_api/dns.rb:22:in `delete'
 | /home/dcleal/code/foreman/foreman/lib/net/dns/ptr_record.rb:15:in `destroy'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration/dns.rb:104:in `del_dns_ptr_record'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:162:in `execute'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:107:in `block in process'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:99:in `each'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:99:in `process'
 | /home/dcleal/code/foreman/foreman/app/models/concerns/orchestration.rb:43:in `on_destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:432:in `block in make_lambda'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:228:in `call'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:228:in `block in halting_and_conditional'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:506:in `call'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:506:in `block in call'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:506:in `each'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:506:in `call'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_destroy_callbacks'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/callbacks.rb:292:in `destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:281:in `block in destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:351:in `block in with_transaction_returning_status'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:348:in `with_transaction_returning_status'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:281:in `destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/persistence.rb:185:in `destroy!'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/associations/has_many_association.rb:171:in `each'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/associations/has_many_association.rb:171:in `delete_records'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/associations/collection_association.rb:525:in `remove_records'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/associations/collection_association.rb:518:in `block in delete_or_destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/associations/collection_association.rb:183:in `block in transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/associations/collection_association.rb:182:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/associations/collection_association.rb:518:in `delete_or_destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/associations/collection_association.rb:279:in `destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/associations/collection_association.rb:223:in `destroy_all'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/associations/has_many_association.rb:27:in `handle_dependency'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/associations/builder/association.rb:146:in `block in add_destroy_callbacks'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:448:in `instance_exec'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:448:in `block in make_lambda'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:164:in `call'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:164:in `block in halting'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `call'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `block in call'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `each'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:504:in `call'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_destroy_callbacks'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/callbacks.rb:292:in `destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:281:in `block in destroy'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:351:in `block in with_transaction_returning_status'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:in `transaction'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:348:in `with_transaction_returning_status'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/activerecord-4.2.6/lib/active_record/transactions.rb:281:in `destroy'
 | /home/dcleal/code/foreman/foreman/app/controllers/hosts_controller.rb:121:in `destroy'
[...]
2016-04-21T13:11:10 [sql] [D] Using host queue
2016-04-21T13:11:10 [sql] [W] Rolling back due to a problem: [#<Orchestration::Task:0x007f85959befe8 @name="Remove Reverse DNS record for wstest.example.com", @status="failed", @priority=1, @action=[#<Nic::Managed id: 11, mac: "52:54:00:88:73:14", ip: "192.168.122.137", 
type: "Nic::Managed", name: "wstest.example.com", host_id: 118, subnet_id: 4, domain_id: 6, attrs: {}, created_at: "2015-01-28 14:06:21", updated_at: "2015-07-21 10:55:31", provider: nil, username: nil, password: nil, virtual: false, link: true, identifier: "eth0", tag: 
"", attached_to: "", managed: true, mode: "balance-rr", attached_devices: "", bond_options: "", primary: true, provision: true, compute_attributes: {"type"=>"network", "_delete"=>"", "network"=>"default", "model"=>"virtio", "from_profile"=>"libvirt"}>, :del_dns_ptr_recor
d], @timestamp=2016-04-21 12:11:10 UTC>]
2016-04-21T13:11:10 [sql] [D]    (0.2ms)  rollback transaction
2016-04-21T13:11:10 [app] [I] Completed 500 Internal Server Error in 598ms (ActiveRecord: 3.9ms)
2016-04-21T13:11:10 [app] [F] 
 | ActiveRecord::RecordNotDestroyed (Failed to destroy the record):
 |   app/controllers/hosts_controller.rb:121:in `destroy'
 |   app/controllers/concerns/application_shared.rb:13:in `set_timezone'
 |   app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 |   lib/middleware/catch_json_parse_errors.rb:9:in `call'
 | 
 | 
2016-04-21T13:11:10 [app] [I]   Rendered /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_source.erb (9.5ms)
2016-04-21T13:11:10 [app] [I]   Rendered /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (3.1ms)
2016-04-21T13:11:10 [app] [I]   Rendered /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.0ms)
2016-04-21T13:11:10 [app] [I]   Rendered /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/actionpack-4.2.6/lib/action_dispatch/middleware/templates/rescues/diagnostics.html.erb within rescues/layout (25.2ms)

#3 Updated by Dominic Cleal over 5 years ago

  • Legacy Backlogs Release (now unused) changed from 155 to 159

#4 Updated by Dominic Cleal over 5 years ago

  • Related to Bug #15206: Unable to Disassociate Hosts or to Remove hosts once they are supposedly disassociated added

#5 Updated by Dominic Cleal over 5 years ago

  • Legacy Backlogs Release (now unused) deleted (159)

#6 Updated by Dominic Cleal over 5 years ago

  • Related to Bug #15768: Destroying of the host not possible added

#7 Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Brandon Weeks
  • Pull request https://github.com/theforeman/foreman/pull/3867 added

#8 Updated by Dominic Cleal almost 5 years ago

  • Has duplicate Bug #18590: Failed to destroy the record added

#9 Updated by Dominic Cleal almost 5 years ago

  • Status changed from Ready For Testing to New
  • Assignee deleted (Brandon Weeks)
  • Pull request deleted (https://github.com/theforeman/foreman/pull/3867)

#10 Updated by Ohad Levy almost 5 years ago

If I understood the original PR correctly, this will be fixed when we migrate to rails 5?

#11 Updated by Dominic Cleal over 4 years ago

  • Related to Bug #19280: Failed to destroy host on 1.15 RC added

#12 Updated by Leos Stejskal 8 months ago

  • Status changed from New to Closed

Hi, I'm closing the issue, it has been here for some time and I wasn't able to reproduce it on the latest version.
If you think that the issue is still relevant feel free to reopen it.

Also available in: Atom PDF