Bug #17853
closedto_ip_address should be part of the interface scope
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'
Updated by The Foreman Bot almost 8 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4139 added
Updated by Timo Goebel almost 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 997cdccf2832781c926e814512dd607a132f5894.
Updated by Dominic Cleal almost 8 years ago
- Translation missing: en.field_release set to 209