Project

General

Profile

Bug #17853

to_ip_address should be part of the interface scope

Added by Timo Goebel over 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DHCP
Target version:
Difficulty:
Triaged:
Bugzilla link:
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'

Associated revisions

Revision 997cdccf (diff)
Added by Timo Goebel over 4 years ago

fixes #17853 - resolve ips in interface scope

History

#1 Updated by The Foreman Bot over 4 years ago

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

#2 Updated by Timo Goebel over 4 years ago

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

#3 Updated by Dominic Cleal over 4 years ago

  • Legacy Backlogs Release (now unused) set to 209

Also available in: Atom PDF