Bug #10852
closedDiscovery image discovery_bootif doesn't match boot interface and can't discover host
Description
I'm not sure if i'm chasing down the right issue, but I have a DELL R630 that i'm trying to get discovery to work on and when the host boots the image i see:
Started POST "/api/v2/discovered_hosts/facts" for 172.28.240.39 at 2015-06-17 08:01:46 -0500
2015-06-17 08:01:46 [I] Processing by Api::V2::DiscoveredHostsController#facts as JSON
2015-06-17 08:01:46 [I] Parameters: {"facts"=>"[FILTERED]", "apiv"=>"v2", "discovered_host"=>{"facts"=>"[FILTERED]"}}
2015-06-17 08:01:47 [I] Import facts for 'macecf4bbced658' completed. Added: 145, Updated: 0, Deleted 0 facts
2015-06-17 08:01:47 [E] address family must be specified (ArgumentError)
/opt/rh/ruby193/root/usr/share/ruby/ipaddr.rb:460:in `initialize'
/usr/share/foreman/app/models/subnet.rb:97:in `new'
/usr/share/foreman/app/models/subnet.rb:97:in `block in subnet_for'
/usr/share/foreman/app/models/subnet.rb:97:in `each'
/usr/share/foreman/app/models/subnet.rb:97:in `subnet_for'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_discovery-3.0.0/app/models/host/discovered.rb:110:in `populate_fields_from_facts'
/usr/share/foreman/app/models/host/base.rb:126:in `import_facts'
I setup SSH on the discovery module, SSH'd into the box and noticed some things
1. On Dells, the first two interfaces are FIBER and the 3rd Interface is the first copper interface
[root@fdi facts]# facter | grep discovery
discovery_bootif => ec:f4:bb:ce:d6:58
discovery_release => 20150525.1
discovery_version => 2.1.1
That mac address is matching the en1 interface
[root@fdi facts]# ifconfig eno1
eno1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet6 fe80::eef4:bbff:fece:d658 prefixlen 64 scopeid 0x20<link>
ether ec:f4:bb:ce:d6:58 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Which has no link
The server successfully booted on on eno3
[root@fdi facts]# ifconfig eno3
eno3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.28.252.27 netmask 255.255.255.0 broadcast 10.28.252.255
inet6 fe80::eef4:bbff:fece:d65c prefixlen 64 scopeid 0x20<link>
ether ec:f4:bb:ce:d6:5c txqueuelen 1000 (Ethernet)
RX packets 11566 bytes 1686079 (1.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8632 bytes 3270766 (3.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device memory 0x91a80000-91afffff
Is this disparity what is causing my Dell to not post to foreman? Is it trying to post the mac info under the non booted interface?
I posted some of my discovery-debug info in the google groups. I can try and attach that here if needed. looks like /usr/share/fdi/facts/discover-facts.rb may need to be refactored so that it correctly identifies the active link in the right order?