Bug #16819

TFTP Rebuild failed for host

Added by Anton Dollmaier 11 months ago. Updated 10 months ago.

Status:Closed
Priority:Normal
Assigned To:Timo Goebel
Category:TFTP
Target version:-
Difficulty: Bugzilla link:1383582
Found in release:1.13.0 Pull request:https://github.com/theforeman/foreman/pull/3929
Story points-
Velocity based estimate-
Release1.13.1Release relationshipAuto

Description

Hi,

after upgrading to 1.13 (also, already to rc1/2), triggering a "rebuild config" via Foreman UI results in the following error message:

2016-10-06T15:15:09 41b4843f [app] [I] Started POST "/hosts/submit_rebuild_config?host_ids%5B%5D=9" for 2001:a62:14b:a301:xxx at 2016-10-06 15:15:09 +0200
2016-10-06T15:15:09 41b4843f [app] [I] Processing by HostsController#submit_rebuild_config as HTML
2016-10-06T15:15:09 41b4843f [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"ZVbKXQGHxZwy9rHR8EGUiagzy99rjCE/8sL0KcVxqQUgb3iVhw1kEZxxx", "host_ids"=>["9"]}
2016-10-06T15:15:09 41b4843f [app] [I] Delete DHCP reservation for argon.example.com-00:25:90:0e:b4:c2/10.10.10.112
2016-10-06T15:15:09 41b4843f [app] [I] Create DHCP reservation for argon.example.com-00:25:90:0e:b4:c2/10.10.10.112
2016-10-06T15:15:09 41b4843f [app] [E] Failed to rebuild TFTP record for argon.example.com (10.10.10.112/2a02:xxxx)
 | ArgumentError: wrong number of arguments (0 for 1)
 | /usr/share/foreman/app/models/concerns/orchestration/tftp.rb:92:in `setTFTP'
 | /usr/share/foreman/app/models/concerns/orchestration/tftp.rb:39:in `rebuild_tftp'
 | /usr/share/foreman/app/models/host/managed.rb:878:in `block (2 levels) in recreate_config'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in `map'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in `map'
 | /usr/share/foreman/app/models/host/managed.rb:877:in `block in recreate_config'
 | /usr/share/foreman/app/models/host/managed.rb:876:in `each'
 | /usr/share/foreman/app/models/host/managed.rb:876:in `map'
 | /usr/share/foreman/app/models/host/managed.rb:876:in `recreate_config'
 | /usr/share/foreman/app/controllers/hosts_controller.rb:508:in `block in submit_rebuild_config'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in `each'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-4.2.7.1/lib/active_record/relation/delegation.rb:46:in `each'
 | /usr/share/foreman/app/controllers/hosts_controller.rb:507:in `submit_rebuild_config'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.2.7.1/lib/abstract_controller/base.rb:198:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.2.7.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/actionpack-4.2.7.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:117:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:117:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:505:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:505:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:313:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:455:in `public_send'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:455:in `block in make_lambda'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:312:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:312:in `block in halting'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:497:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:497:in `block in around'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:505:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:505:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:313:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /usr/share/foreman/app/controllers/concerns/application_shared.rb:14:in `set_timezone'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:312:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:312:in `block in halting'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:497:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:497:in `block in around'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:505:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:505:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:313:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:432:in `block in make_lambda'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:312:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:312:in `block in halting'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:497:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:497:in `block in around'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:505:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:505:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:313:in `call'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'
 | /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/callbacks.rb:455:in `public_send'

This could be related to missing/incomplete migrations, as the "kind" parameter, which is required for setTFTP, is not passed to rebuild_tftp.

I do have set:

  • PXE Loader (pxelinux BIOS)
  • IPv4/IPv6 subnets with appropriate mapping to TFTP / Proxy
  • interface eth0 is managed, primary, provision

Is there anything else I should supply to resolve this?

Best,
Anton


Related issues

Related to Foreman - Feature #12634: New HW Model flag pxe_loader in UI/API Closed 11/30/2015

Associated revisions

Revision 25f058c5
Added by Timo Goebel 10 months ago

fixes #16819 - rebuild tftp with template kinds

History

#1 Updated by Dominic Cleal 11 months ago

  • Related to Feature #12634: New HW Model flag pxe_loader in UI/API added

#2 Updated by Dominic Cleal 11 months ago

  • Release set to 1.13.1

Thanks, that's plenty. It's a code bug as the additional argument was added without fixing the rebuild method that calls it.

#3 Updated by Anton Dollmaier 11 months ago

Dominic Cleal wrote:

Thanks, that's plenty. It's a code bug as the additional argument was added without fixing the rebuild method that calls it.

You're right. I didn't find #12634, which references 4cbf879ed5957978afd74b3707c8a6b16fa18225. This actually looks like it could fix this.

I'll wait for 1.13.1 or similar :)

#4 Updated by The Foreman Bot 10 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Timo Goebel
  • Pull request https://github.com/theforeman/foreman/pull/3929 added

#5 Updated by Lukas Zapletal 10 months ago

  • Bugzilla link set to 1383582

#6 Updated by Timo Goebel 10 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF