Project

General

Profile

Bug #1451

Host creation fails if ":tftp_servername:" is set in proxy-settings

Added by David M. over 7 years ago. Updated over 7 years ago.

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

Description

I always get an object nil error when trying to create a host while ":tftp_servername:" was set in the foreman smart-proxy settings.

After commenting it and restarting proxy host-creation worked.
The error seems to be a call to a function on a none-existing object:

Started POST "/hosts" for 10.110.10.95 at Tue Jan 17 14:06:07 +0000 2012
  Processing by HostsController#create as HTML
  Parameters: {"commit"=>"Submit", "authenticity_token"=>"15Df/II3jV6YRuRB4jd96Bl9t46ZsvknND3n5htcgo4=", "utf8"=>"✓", "host"=>{"name"=>"sv6011", "puppetproxy_id"=>"1", "managed"=>"true", "subnet_id"=>"1", "architecture_id"=>"1", "comment"=>"", "puppetmaster_name"=>"vm7603.test.sample", "sp_mac"=>"", "mac"=>"d0:67:e5:f9:11:92", "domain_id"=>"1", "sp_name"=>"", "hostgroup_id"=>"1", "medium_id"=>"6", "use_image"=>"0", "build"=>"1", "root_pass"=>"[FILTERED]", "enabled"=>"1", "ptable_id"=>"6", "environment_id"=>"1", "ip"=>"10.31.0.105", "sp_subnet_id"=>"", "model_id"=>"1", "puppetclass_ids"=>[""], "sp_ip"=>"", "disk"=>"", "operatingsystem_id"=>"1"}}
failed to detect boot server: undefined method `bootserver_ip' for #<ProxyAPI::TFTP:0x7f33eb681048>
Create DHCP reservation for sv6011.test.sample-d0:67:e5:f9:11:92/10.31.0.105
Add the TFTP configuration for sv6011.test.sample
Fetching required TFTP boot files for sv6011.test.sample
Rolling back due to a problem: 
Delete the TFTP configuration for sv6011.test.sample
Failed to perform rollback on DHCP Settings for sv6011.test.sample - undefined method `destroy' for nil:NilClass
Failed to save: failed to detect boot server: undefined method `bootserver_ip' for #<ProxyAPI::TFTP:0x7f33eb681048>, Failed to perform rollback on DHCP Settings for sv6011.test.sample - undefined method `destroy' for nil:NilClass
Rendered puppetclasses/_selectedClasses.html.erb (0.0ms)
Rendered puppetclasses/_classes.html.erb (1.5ms)
Rendered puppetclasses/_class_selection.html.erb (6.4ms)
Rendered hosts/_mac.html.erb (0.9ms)
Rendered common/_domain.html.erb (110.8ms)
Rendered common/_domain_subnet.html.erb (116.4ms)
Rendered hosts/_sp_subnet.html.erb (1.3ms)
Rendered common/os_selection/_architecture.html.erb (3.7ms)
Rendered common/os_selection/_image_details.html.erb (4.2ms)
Rendered common/os_selection/_operatingsystem.html.erb (11.0ms)
Rendered common/os_selection/_initial.html.erb (17.6ms)
Rendered hosts/_unattended.html.erb (143.7ms)
Rendered common_parameters/_parameter.erb (3.6ms)
Rendered common_parameters/_parameters.erb (5.0ms)
Rendered hosts/_form.html.erb (177.0ms)
Rendered bookmarks/_list.html.erb (2.2ms)
Rendered bookmarks/_list.html.erb (0.8ms)
Rendered home/_settings.html.erb (116.9ms)
Rendered home/_topbar.rhtml (125.9ms)
Rendered hosts/new.html.erb within layouts/application (308.5ms)
Completed 200 OK in 488ms (Views: 303.9ms | ActiveRecord: 9.6ms)

Also the error message is not completly shown in WebUI, because of the <-Sign in the error message.


Related issues

Related to Foreman - Bug #1381: Foreman uses fqdn internally for DHCP nextServer. This should be the IP address.Closed2011-12-07
Related to Foreman - Bug #1420: bootserver ip lookup fails if not managing dnsClosed2011-12-31
Has duplicate Foreman - Bug #1504: Failed to save: failed to detect boot server: undefined method `bootserver_ip'Duplicate2012-02-23

Associated revisions

Revision a7ad2c1c (diff)
Added by Ohad Levy over 7 years ago

fixes #1451 - Host creation fails if ":tftp_servername:" is set in proxy-settings

History

#1 Updated by Ohad Levy over 7 years ago

  • Category set to TFTP
  • Assignee set to Ohad Levy
  • Target version set to 1.0

it seems that the solution for #1381 and #1420 introduce a bug where the proxy was trying to use another class methods.

#2 Updated by Ohad Levy over 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF