Actions
Bug #12259
closedHost deletion generates error: undefined method `error?' for nil:NilClass
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
Hi,
When I delete a host from Foreman, I get an "undefined method `error?' for nil:NilClass" error page.
VM is deleted.
DNS and DHCP entries are removed.
Host is also remove from Foreman host list.
Only chef node is not removed from Chef server, but nil:NilClass error also happens on non-chef host (I mean no chef proxy is filled in Host configuration).
So I don't think this bug is the same as Bug #11969
These hosts are deployed on ESX servers through vmware provider.
In production.log:
2015-10-22T12:32:39 [app] [I] Started DELETE "/hosts/deploy-c6-vm2.qt.cls.fr" for 10.1.10.5 at 2015-10-22 12:32:39 +0000 2015-10-22T12:32:39 [app] [I] Processing by HostsController#destroy as HTML 2015-10-22T12:32:39 [app] [I] Parameters: {"authenticity_token"=>"c4yKJx/RnGj3VWcRh1KGUnhhG41v/fWbnTfNqXnzqvM=", "id"=>"deploy-c6-vm2.qt.cls.fr"} 2015-10-22T12:32:40 [app] [I] Delete the DNS PTR record for 192.168.16.43/deploy-c6-vm2.qt.cls.fr 127.0.0.1 - - [22/Oct/2015 12:32:40] "DELETE /dns/43.16.168.192.in-addr.arpa HTTP/1.1" 200 - 0.0583 2015-10-22T12:32:40 [app] [I] Delete the DNS A record for deploy-c6-vm2.qt.cls.fr/192.168.16.43 127.0.0.1 - - [22/Oct/2015 12:32:40] "DELETE /dns/deploy-c6-vm2.qt.cls.fr HTTP/1.1" 200 - 0.0572 127.0.0.1 - - [22/Oct/2015 12:32:40] "GET /tftp/serverName HTTP/1.1" 200 29 0.0008 2015-10-22T12:32:40 [app] [I] Delete DHCP reservation for deploy-c6-vm2.qt.cls.fr-00:50:56:b5:5a:a1/192.168.16.43 127.0.0.1 - - [22/Oct/2015 12:32:40] "DELETE /dhcp/192.168.16.0/00:50:56:b5:5a:a1 HTTP/1.1" 200 - 0.0222 2015-10-22T12:32:40 [sql] [I] Delete the TFTP configuration for deploy-c6-vm2.qt.cls.fr 127.0.0.1 - - [22/Oct/2015 12:32:40] "DELETE /tftp/syslinux/00:50:56:b5:5a:a1 HTTP/1.1" 200 - 0.0009 2015-10-22T12:32:40 [sql] [I] Remove puppet certificate for deploy-c6-vm2.qt.cls.fr 127.0.0.1 - - [22/Oct/2015 12:32:42] "DELETE /puppet/ca/deploy-c6-vm2.qt.cls.fr HTTP/1.1" 200 - 2.1264 2015-10-22T12:32:42 [sql] [I] Delete the autosign entry for deploy-c6-vm2.qt.cls.fr E, [2015-10-22T12:32:42.872374 #2391] ERROR -- : Attempt to remove nonexistent client autosign for deploy-c6-vm2.qt.cls.fr 127.0.0.1 - - [22/Oct/2015 12:32:42] "DELETE /puppet/ca/autosign/deploy-c6-vm2.qt.cls.fr HTTP/1.1" 404 73 0.0010 2015-10-22T12:32:42 [sql] [I] Removing Compute instance for deploy-c6-vm2.qt.cls.fr 2015-10-22T12:32:42 [sql] [I] Successfully decrypted field for Foreman::Model::Vmware vcenter-mqt 2015-10-22T12:32:47 [app] [W] Action failed | NoMethodError: undefined method `error?' for nil:NilClass | /usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.7.2/app/models/foreman_tasks/concerns/action_triggering.rb:132:in `execute_planned_action' | /usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.7.2/app/models/foreman_tasks/concerns/action_triggering.rb:111:in `block in dynflow_task_wrap' | /usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.7.2/app/models/foreman_tasks/concerns/action_triggering.rb:110:in `tap' | /usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.7.2/app/models/foreman_tasks/concerns/action_triggering.rb:110:in `dynflow_task_wrap' | /usr/share/foreman/vendor/ruby/2.1.0/gems/foreman-tasks-0.7.2/app/models/foreman_tasks/concerns/action_triggering.rb:34:in `destroy' | /usr/share/foreman/app/controllers/hosts_controller.rb:112:in `destroy'
I am not able to find which action is causing this error, do you think it has something to do with autosign removal error?
Foreman 1.9.2
foreman_chef 0.2.0
smart_chef_proxy 0.1.5
Actions