Project

General

Profile

Actions

Bug #17853

closed

to_ip_address should be part of the interface scope

Added by Timo Goebel over 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DHCP
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When a Host::Discovered becomes a Host::Managed, I see this error:

Dhcp orchestration calls to_ip_address (for the boot server) which is delegated from nic to host but in the host scope it cannot resolve dns because the subnet is nil... if i move to_ip_address to nic::managed this issue seems fixed.

| Foreman::WrappedException: ERF50-9294 [Foreman::WrappedException]: Unable to find IP address for 'xxxx' ([NoMethodError]: undefined method `resolv
er' for nil:NilClass) | /usr/share/foreman/app/models/host/managed.rb:903:in `rescue in to_ip_address' | /usr/share/foreman/app/models/host/managed.rb:894:in `to_ip_address' | /usr/share/foreman/app/models/nic/managed.rb:21:in `to_ip_address' | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:85:in `boot_server' | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:119:in `dhcp_attrs' | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:97:in `build_dhcp_record' | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:25:in `block in dhcp_records' | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:24:in `map' | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:24:in `dhcp_records' | /usr/share/foreman/app/models/concerns/orchestration/dhcp.rb:56:in `set_dhcp' | /usr/share/foreman/app/models/concerns/orchestration.rb:195:in `execute' | /usr/share/foreman/app/models/concerns/orchestration.rb:135:in `block in process' | /usr/share/foreman/app/models/concerns/orchestration.rb:127:in `each' | /usr/share/foreman/app/models/concerns/orchestration.rb:127:in `process' | /usr/share/foreman/app/models/concerns/orchestration.rb:35:in `around_save_orchestration'

Actions #1

Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4139 added
Actions #2

Updated by Timo Goebel about 7 years ago

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

Updated by Dominic Cleal about 7 years ago

  • translation missing: en.field_release set to 209
Actions

Also available in: Atom PDF