Actions
Bug #6925
closedImprove error handling for nodes without network
Difficulty:
trivial
Triaged:
Description
When discovered host is booted without network, ugly error is issued and the client is returned with 500 without further description:
address family must be specified (IPAddr::AddressFamilyError) /home/lzap/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/ipaddr.rb:475:in `initialize' /home/lzap/work/foreman/app/models/subnet.rb:71:in `new' /home/lzap/work/foreman/app/models/subnet.rb:71:in `block in subnet_for' /home/lzap/work/foreman/app/models/subnet.rb:71:in `each' /home/lzap/work/foreman/app/models/subnet.rb:71:in `subnet_for' /home/lzap/work/foreman_discovery/app/models/host/discovered.rb:76:in `populate_fields_from_facts' /home/lzap/work/foreman/app/models/host/base.rb:52:in `import_facts' /home/lzap/work/foreman_discovery/app/models/host/discovered.rb:67:in `import_facts' /home/lzap/work/foreman_discovery/app/models/host/discovered.rb:59:in `import_host_and_facts' /home/lzap/work/foreman_discovery/app/controllers/api/v2/discovered_hosts_controller.rb:97:in `facts'
We should test for IP fact presence.
Actions