With some debugging output, production.log
Started PUT "/discovers/080027be2282" for 10.55.164.101 at Mon Oct 21
10:20:39 +0100 2013
Processing by DiscoversController#update as /
Parameters: {"host"=>{"progress_report_id"=>"[FILTERED]",
"root_pass"=>"[FILTERED]", "mac"=>"08:00:27:be:22:82", "ip"=>"10.0.1.10",
"disk"=>"", "model_id"=>"1", "name"=>"080027be2282",
"puppet_proxy_id"=>"1", "architecture_id"=>"1", "operatingsystem_id"=>"1",
"ptable_id"=>"7",
"interfaces_attributes"=>{"new_interfaces"=>{"_destroy"=>"false",
"mac"=>"", "ip"=>"", "name"=>"", "provider"=>"IPMI", "domain_id"=>"",
"type"=>"Nic::Managed"}}, "enabled"=>"1", "overwrite"=>"false",
"puppet_ca_proxy_id"=>"1", "managed"=>"true", "domain_id"=>"1",
"build"=>"1", "is_owned_by"=>"2-Users", "comment"=>"", "hostgroup_id"=>"1",
"environment_id"=>"1", "puppetclass_ids"=>[""], "type"=>"Host::Managed",
"provision_method"=>"build", "medium_id"=>"5"}, "id"=>"080027be2282",
"utf8"=>"✓",
"authenticity_token"=>"oMKdFYVm3jlE2JO1griC6+i+2pklGFYF0ytcVLf9pMA="}
UPDATING this host
#<Host::Discovered id: 27, name: "080027be2282", ip: "10.0.1.10",
last_compile: nil, last_freshcheck: nil, last_report: "2013-10-21
09:17:46", updated_at: "2013-10-21 09:17:46", source_file_id: nil,
created_at: "2013-10-21 09:17:46", mac: "08:00:27:be:22:82", root_pass:
nil, serial: nil, puppet_status: 0, domain_id: nil, architecture_id: nil,
operatingsystem_id: nil, environment_id: nil, subnet_id: nil, ptable_id:
nil, medium_id: nil, build: false, comment: nil, disk: nil, installed_at:
nil, model_id: 1, hostgroup_id: nil, owner_id: nil, owner_type: nil,
enabled: true, puppet_ca_proxy_id: nil, managed: nil, use_image: nil,
image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil,
certname: nil, image_id: nil, organization_id: nil, location_id: nil, type:
"Host::Discovered">
ForemanDiscovery: Rebooting 080027be2282.cell as its being discovered and
assigned
ForemanDiscovery: reboot result: successful
Redirected to https://10.55.164.201/hosts/080027be2282.cell
UPDATE SUCCESS
HOST updated to
#<Host::Managed id: 27, name: "080027be2282.cell", ip: "10.0.1.10",
last_compile: nil, last_freshcheck: nil, last_report: "2013-10-21
09:17:46", updated_at: "2013-10-21 09:20:39", source_file_id: nil,
created_at: "2013-10-21 09:17:46", mac: "08:00:27:be:22:82", root_pass:
nil, serial: nil, puppet_status: 0, domain_id: 1, architecture_id: 1,
operatingsystem_id: 1, environment_id: 1, subnet_id: nil, ptable_id: 7,
medium_id: 5, build: true, comment: "", disk: "", installed_at: nil,
model_id: 1, hostgroup_id: 1, owner_id: 2, owner_type: "User", enabled:
true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file:
nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: 1, certname:
nil, image_id: nil, organization_id: nil, location_id: nil, type:
"Host::Managed">
Completed 302 Found in 421ms (ActiveRecord: 29.2ms)
Started GET "/hosts/080027be2282.cell" for 10.55.164.101 at Mon Oct 21
10:20:39 +0100 2013
Processing by HostsController#show as /
Parameters: {"id"=>"080027be2282.cell"}
Rendered hosts/_overview.html.erb (237.5ms)
Rendered hosts/show.html.erb within layouts/application (628.4ms)
Rendered home/_user_dropdown.html.erb (2.3ms)
Read fragment views/tabs_and_title_records-2 (0.4ms)
Rendered home/_topbar.html.erb (4.8ms)
Completed 200 OK in 657ms (Views: 528.9ms | ActiveRecord: 115.7ms)
Started GET "/discovers/080027be2282/edit" for 10.55.164.101 at Mon Oct 21
10:20:40 +0100 2013
Processing by DiscoversController#edit as /
Parameters: {"id"=>"080027be2282"}
Editing
Operation FAILED: undefined method `becomes' for nil:NilClass
Rendered common/500.html.erb (3.2ms)
Completed 500 Internal Server Error in 16ms (Views: 6.9ms | ActiveRecord:
1.4ms)
···
On Monday, October 21, 2013 10:12:04 AM UTC+1, Alan Sergeant wrote:
>
> It may also be a foreman proxy issue as tftp is logging
> Oct 21 10:10:28 theforeman in.tftpd[4446]: tftp: client does not accept
> options
>
> into syslog
>
> On Sunday, October 20, 2013 7:26:38 PM UTC+1, Alan Sergeant wrote:
>>
>> After a host has been discovered, when trying to provision, the pxeboot
>> file is not being created in the pxelinux.cfg folder.
>>
>> The production.log shows:
>>
>> Processing by DiscoversController#edit as */*
>> Parameters: {"id"=>"080027be2282"}
>> Operation FAILED: undefined method `becomes' for nil:NilClass
>> Rendered common/500.html.erb (3.5ms)
>>
>>
>> I think the problem occurs in the Discovers Controller here:
>>
>> def edit
>> @host = @host.becomes(::Host::Managed)
>> @host.type = 'Host::Managed'
>> @host.managed = true
>> @host.build = true
>>
>> render :template => 'hosts/edit'
>> end
>>
>> Any ideas on a fix?
>>
>