Actions
Bug #12338
closedDiscover host is registered twice
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Discovery plugin
Description
I was trying to add a new interface on discovered host. Interface was added, but when I refreshed the facts, I got following exception:
Warning! Could not get facts from proxy https://foreman_server:9090/discovery/192.168.100.36: ERF42-1064 [Foreman::Exception]: Unable to assign subnet, primary interface is missing IP address
Please note that dhcp proxy is properly associated with selected subnet. This happens in both cases like: discovery with dhcp and w/o dhcp
As soon as we refresh the host, the assigned IP also wiped out from webUI listing. Please see the screenshot.
production.log:
----------------
| Started GET "/discovered_hosts/mac525400be8e1b/refresh_facts" for 10.10.54.100 at 2015-10-28 03:48:59 -0400 2015-10-28 03:48:59 [app] [I] Processing by DiscoveredHostsController#refresh_facts as HTML 2015-10-28 03:48:59 [app] [I] Parameters: {"id"=>"mac525400be8e1b"} 2015-10-28 03:49:01 [app] [I] Import facts for 'mac525400e72f09' completed. Added: 0, Updated: 0, Deleted 0 facts 2015-10-28 03:49:01 [app] [W] Action failed | RuntimeError: Could not get facts from proxy https://cloud-qe-19.idmqe.lab.eng.bos.redhat.com:9090/discovery/192.168.100.36: ERF42-1064 [Foreman::Exception]: Unable to assign subnet, primary interface is missing IP address | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-4.1.1/app/models/host/discovered.rb:138:in `rescue in refresh_facts' | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-4.1.1/app/models/host/discovered.rb:135:in `refresh_facts' | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-4.1.1/app/controllers/discovered_hosts_controller.rb:64:in `refresh_facts' | /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action' | /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action' | /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action' | /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action' | /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:649:in `block (4 levels) in _run__2799771436671021720__process_action__3853937877995232844__callbacks'
Files
Actions