Project

General

Profile

Actions

Bug #17853

closed

to_ip_address should be part of the interface scope

Added by Timo Goebel almost 8 years ago. Updated over 6 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

Also available in: Atom PDF