Discovery is failed ERF-42-1064

I’m booting from pxe and see 500 error.
All networks are setup in foreman & the servers is getting ip address from the dhcp.

Can you please advice on this?

Pictures attached

Thank you

This problem happens when Organizations is used and a networks is assigned to an organization.
Custom fact with a specific organization doesn’t help on this.
Is there a bug on this?
THanks

Logs:

2018-05-30 16:17:36 c218a00f [app] [I] Started POST "/api/v2/discovered_hosts/facts" for 192.178.1.209 at 2018-05-30 16:17:36 -0700
2018-05-30 16:17:36 c218a00f [app] [I] Processing by Api::V2::DiscoveredHostsController#facts as JSON
2018-05-30 16:17:36 c218a00f [app] [I]   Parameters: {"facts"=>"[FILTERED]", "apiv"=>"v2", "discovered_host"=>{"facts"=>"[FILTERED]"}}
2018-05-30 16:17:36 c218a00f [app] [I] Current user: foreman_admin (administrator)
2018-05-30 16:17:36 c218a00f [app] [D] Setting current user thread-local variable to foreman_admin
2018-05-30 16:17:36 c218a00f [audit] [I] [-----71b1] deleted 0 (20.6ms)
2018-05-30 16:17:36 c218a00f [audit] [D] "{}"
2018-05-30 16:17:36 c218a00f [audit] [I] [-----71b1] updated 0 (470.9ms)
2018-05-30 16:17:36 c218a00f [audit] [D] "{}"
2018-05-30 16:17:36 c218a00f [audit] [I] [-----71b1] added 0 (9.9ms)
2018-05-30 16:17:36 c218a00f [audit] [D] "{}"
2018-05-30 16:17:36 c218a00f [app] [I] Import facts for '-----71b1' completed. Added: 0, Updated: 0, Deleted 0 facts
2018-05-30 16:17:36 c218a00f [app] [D] skipping interface with identifier 'lo' since it was matched by 'ignored_interface_identifiers' setting
2018-05-30 16:17:36 c218a00f [app] [D] We have following interfaces 'em1, em2, em3, em4' based on facts
2018-05-30 16:17:36 c218a00f [app] [D] Interface em1 facts: {"network"=>"192.183.34.0", "ipaddress"=>"192.183.34.9", "macaddress"=>"-----71:b1", "netmask"=>"255.255.255.192", "mtu"=>1500, "speed"=>"10000", "duplex"=>"full", "port"=>"Direct Attach Copper", "auto_negotiation"=>"false", "link"=>"true", "lldp_neighbor_chassisid"=>"c0:42:d0:57:d1:a0", "lldp_neighbor_portid"=>"xe-0/0/1", "lldp_neighbor_sysname"=>"sjc04-spi-pod4-data01-au29", "lldp_neighbor_mngaddr_ipv4"=>"192.178.31.22", "lldp_neighbor_pvid"=>409, "lldp_neighbor_mtu"=>"1514"}
2018-05-30 16:17:36 c218a00f [app] [D] Interface em2 facts: {"macaddress"=>"-----71:b3", "mtu"=>1500, "duplex"=>"unknown! (255)", "port"=>"FIBRE", "auto_negotiation"=>"false", "link"=>"false"}
2018-05-30 16:17:36 c218a00f [app] [D] Interface em3 facts: {"macaddress"=>"-----71:b5", "mtu"=>1500, "duplex"=>"unknown! (255)", "port"=>"Twisted Pair", "auto_negotiation"=>"true", "link"=>"false"}
2018-05-30 16:17:36 c218a00f [app] [D] Interface em4 facts: {"macaddress"=>"-----71:b7", "mtu"=>1500, "duplex"=>"unknown! (255)", "port"=>"Twisted Pair", "auto_negotiation"=>"true", "link"=>"false"}
2018-05-30 16:17:36 c218a00f [app] [D] Saving em1 NIC for host -----71b1
2018-05-30 16:17:36 c218a00f [app] [W] Saving em1 NIC for host -----71b1 failed, skipping because:
2018-05-30 16:17:36 c218a00f [app] [W]  Subnet is not defined for host's organization.
2018-05-30 16:17:36 c218a00f [app] [D] Saving ipmi NIC for host -----71b1
2018-05-30 16:17:36 c218a00f [app] [W] Saving ipmi NIC for host -----71b1 failed, skipping because:
2018-05-30 16:17:36 c218a00f [app] [W]  Subnet is not defined for host's organization.
2018-05-30 16:17:36 c218a00f [app] [D] Setting current user thread-local variable to nil
2018-05-30 16:17:36 c218a00f [app] [W] Host discovery failed, facts: {"lib"=>"/usr/share/fdi/facts:/opt/extension/facts", "virtual"=>"physical", "is_virtual"=>false, "architecture"=>"x86_64", "id"=>"root", "macaddress"=>"-----71:b1", "os"=>{"name"=>"CentOS", "family"=>"RedHat", "release"=>{"major"=>"7", "minor"=>"4", "full"=>"7.4.1708"}}, "hardwareisa"=>"x86_64", "fqdn"=>"fdi.example.com", "hardwaremodel"=>"x86_64", "boardmanufacturer"=>"Dell Inc.", "boardproductname"=>"00WGD1", "boardserialnumber"=>".1WB6CP2.CNFCP0082R00LF.", "bios_vendor"=>"Dell Inc.", "bios_version"=>"1.3.7", "bios_release_date"=>"02/08/2018", "manufacturer"=>"Dell Inc.", "productname"=>"PowerEdge R740", "serialnumber"=>"1WB6CP2", "uuid"=>"4C4C4544-0057-4210-8036-B1C04F435032", "type"=>"Rack Mount Chassis", "ps"=>"ps -ef", "dhcp_servers"=>{"system"=>"192.178.1.209", "em1"=>"192.178.1.209"}, "physicalprocessorcount"=>2, "processors"=>{"models"=>["Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz"], "count"=>72, "physicalcount"=>2}, "processor0"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor1"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor2"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor3"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor4"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor5"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor6"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor7"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor8"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor9"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor10"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor11"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor12"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor13"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor14"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor15"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor16"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor17"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor18"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor19"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor20"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor21"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor22"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor23"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor24"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor25"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor26"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor27"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor28"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor29"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor30"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor31"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor32"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor33"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor34"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor35"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor36"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor37"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor38"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor39"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor40"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor41"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor42"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor43"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor44"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor45"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor46"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor47"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor48"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor49"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor50"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor51"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor52"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor53"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor54"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor55"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor56"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor57"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor58"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor59"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor60"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor61"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor62"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor63"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor64"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor65"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor66"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor67"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor68"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor69"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor70"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processor71"=>"Intel(R) Xeon(R) Gold 6150 CPU @ 2.70GHz", "processorcount"=>72, "ipaddress"=>"192.183.34.9", "netmask"=>"255.255.255.192", "blockdevice_sda_size"=>1919716163584, "blockdevice_sda_vendor"=>"DELL", "blockdevice_sda_model"=>"PERC H740P Adp", "blockdevices"=>"sda", "uniqueid"=>"b70a0922", "facterversion"=>"2.4.1", "hostname"=>"fdi", "domain"=>"example.com", "memorysize"=>"503.56 GB", "memorysize_mb"=>"515644.39", "network_em1"=>"192.183.34.0", "network_lo"=>"127.0.0.0", "interfaces"=>"em1,em2,em3,em4,lo", "ipaddress_em1"=>"192.183.34.9", "macaddress_em1"=>"-----71:b1", "netmask_em1"=>"255.255.255.192", "mtu_em1"=>1500, "macaddress_em2"=>"-----71:b3", "mtu_em2"=>1500, "macaddress_em3"=>"-----71:b5", "mtu_em3"=>1500, "macaddress_em4"=>"-----71:b7", "mtu_em4"=>1500, "ipaddress_lo"=>"127.0.0.1", "netmask_lo"=>"255.0.0.0", "mtu_lo"=>65536, "gid"=>"root", "selinux"=>false, "discovery_version"=>"3.4.4", "discovery_release"=>"20180123.1", "discovery_bootif"=>"-----71:b1", "discovery_bootip"=>"192.183.34.9", "speed_em1"=>"10000", "duplex_em1"=>"full", "port_em1"=>"Direct Attach Copper", "auto_negotiation_em1"=>"false", "wol_em1"=>false, "link_em1"=>"true", "duplex_em2"=>"unknown! (255)", "port_em2"=>"FIBRE", "auto_negotiation_em2"=>"false", "wol_em2"=>false, "link_em2"=>"false", "duplex_em3"=>"unknown! (255)", "port_em3"=>"Twisted Pair", "auto_negotiation_em3"=>"true", "wol_em3"=>false, "link_em3"=>"false", "duplex_em4"=>"unknown! (255)", "port_em4"=>"Twisted Pair", "auto_negotiation_em4"=>"true", "wol_em4"=>false, "link_em4"=>"false", "link_lo"=>"true", "ipmi_enabled"=>true, "ipmi_ipaddress_source"=>"Static Address", "ipmi_ipaddress"=>"192.178.28.27", "ipmi_subnet_mask"=>"255.255.252.0", "ipmi_macaddress"=>"d0:94:66:49:cb:35", "ipmi_gateway"=>"192.178.28.1", "ipmi_1_ipaddress_source"=>"Static Address", "ipmi_1_ipaddress"=>"192.178.28.27", "ipmi_1_subnet_mask"=>"255.255.252.0", "ipmi_1_macaddress"=>"d0:94:66:49:cb:35", "ipmi_1_gateway"=>"192.178.28.1", "nmprimary_connection_id"=>"primary", "nmprimary_connection_uuid"=>"b4f77630-6431-11e8-9adc-d094664b71b1", "nmprimary_connection_stable-id"=>"", "nmprimary_connection_interface-name"=>"", "nmprimary_connection_type"=>"802-3-ethernet", "nmprimary_connection_autoconnect"=>"yes", "nmprimary_connection_autoconnect-priority"=>"1", "nmprimary_connection_autoconnect-retries"=>"-1", "nmprimary_connection_read-only"=>"no", "nmprimary_connection_permissions"=>"", "nmprimary_connection_zone"=>"", "nmprimary_connection_master"=>"", "nmprimary_connection_slave-type"=>"", "nmprimary_connection_autoconnect-slaves"=>"-1", "nmprimary_connection_secondaries"=>"", "nmprimary_connection_metered"=>"unknown", "nmprimary_connection_lldp"=>"default", "nmprimary_802-3-ethernet_port"=>"", "nmprimary_802-3-ethernet_speed"=>"0", "nmprimary_802-3-ethernet_duplex"=>"", "nmprimary_802-3-ethernet_auto-negotiate"=>"no", "nmprimary_802-3-ethernet_mac-address"=>"-----71:B1", "nmprimary_802-3-ethernet_cloned-mac-address"=>"", "nmprimary_802-3-ethernet_generate-mac-address-mask"=>"", "nmprimary_802-3-ethernet_mac-address-blacklist"=>"", "nmprimary_802-3-ethernet_mtu"=>"auto", "nmprimary_802-3-ethernet_s390-subchannels"=>"", "nmprimary_802-3-ethernet_s390-nettype"=>"", "nmprimary_802-3-ethernet_s390-options"=>"", "nmprimary_802-3-ethernet_wake-on-lan"=>"default", "nmprimary_802-3-ethernet_wake-on-lan-password"=>"", "nmprimary_ipv4_method"=>"auto", "nmprimary_ipv4_dns"=>"", "nmprimary_ipv4_dns-search"=>"", "nmprimary_ipv4_dns-options"=>"", "nmprimary_ipv4_dns-priority"=>"0", "nmprimary_ipv4_addresses"=>"", "nmprimary_ipv4_gateway"=>"", "nmprimary_ipv4_routes"=>"", "nmprimary_ipv4_route-metric"=>"-1", "nmprimary_ipv4_ignore-auto-routes"=>"no", "nmprimary_ipv4_ignore-auto-dns"=>"no", "nmprimary_ipv4_dhcp-client-id"=>"", "nmprimary_ipv4_dhcp-send-hostname"=>"no", "nmprimary_ipv4_dhcp-hostname"=>"", "nmprimary_ipv4_dhcp-fqdn"=>"", "nmprimary_ipv4_never-default"=>"no", "nmprimary_ipv4_may-fail"=>"yes", "nmprimary_ipv6_method"=>"ignore", "nmprimary_ipv6_dns"=>"", "nmprimary_ipv6_dns-search"=>"", "nmprimary_ipv6_dns-options"=>"", "nmprimary_ipv6_dns-priority"=>"0", "nmprimary_ipv6_addresses"=>"", "nmprimary_ipv6_gateway"=>"", "nmprimary_ipv6_routes"=>"", "nmprimary_ipv6_route-metric"=>"-1", "nmprimary_ipv6_ignore-auto-routes"=>"no", "nmprimary_ipv6_ignore-auto-dns"=>"no", "nmprimary_ipv6_never-default"=>"no", "nmprimary_ipv6_may-fail"=>"yes", "nmprimary_ipv6_ip6-privacy"=>"-1", "nmprimary_ipv6_addr-gen-mode"=>"eui64", "nmprimary_ipv6_dhcp-send-hostname"=>"yes", "nmprimary_ipv6_dhcp-hostname"=>"", "nmprimary_ipv6_token"=>"", "nmprimary_vlan_parent"=>"", "nmprimary_vlan_id"=>"0", "nmprimary_vlan_flags"=>"1", "nmprimary_vlan_ingress-priority-map"=>"", "nmprimary_vlan_egress-priority-map"=>"", "nmprimary_proxy_method"=>"none", "nmprimary_proxy_browser-only"=>"no", "nmprimary_proxy_pac-url"=>"", "nmprimary_proxy_pac-script"=>"", "nmprimary_general_name"=>"primary", "nmprimary_general_uuid"=>"b4f77630-6431-11e8-9adc-d094664b71b1", "nmprimary_general_devices"=>"em1", "nmprimary_general_state"=>"activated", "nmprimary_general_default"=>"yes", "nmprimary_general_default6"=>"no", "nmprimary_general_vpn"=>"no", "nmprimary_general_zone"=>"", "nmprimary_general_spec-object"=>"", "nmprimary_ip4_address"=>"192.183.34.9/26", "nmprimary_ip4_gateway"=>"192.183.34.1", "nmprimary_ip4_dns"=>"192.33.169.12", "nmprimary_ip4_domain"=>"example.com", "nmprimary_dhcp4_option_requested_routers"=>"1", "nmprimary_dhcp4_option_requested_domain_search"=>"1", "nmprimary_dhcp4_option_dhcp_server_identifier"=>"192.178.1.209", "nmprimary_dhcp4_option_requested_domain_name"=>"1", "nmprimary_dhcp4_option_filename"=>"pxelinux.0", "nmprimary_dhcp4_option_requested_rfc3442_classless_static_routes"=>"1", "nmprimary_dhcp4_option_requested_classless_static_routes"=>"1", "nmprimary_dhcp4_option_requested_wpad"=>"1", "nmprimary_dhcp4_option_requested_broadcast_address"=>"1", "nmprimary_dhcp4_option_next_server"=>"192.178.1.209", "nmprimary_dhcp4_option_broadcast_address"=>"192.183.34.63", "nmprimary_dhcp4_option_requested_interface_mtu"=>"1", "nmprimary_dhcp4_option_requested_subnet_mask"=>"1", "nmprimary_dhcp4_option_expiry"=>"1527704186", "nmprimary_dhcp4_option_dhcp_message_type"=>"5", "nmprimary_dhcp4_option_ip_address"=>"192.183.34.9", "nmprimary_dhcp4_option_routers"=>"192.183.34.1", "nmprimary_dhcp4_option_domain_name"=>"example.com", "nmprimary_dhcp4_option_requested_static_routes"=>"1", "nmprimary_dhcp4_option_requested_nis_servers"=>"1", "nmprimary_dhcp4_option_requested_ntp_servers"=>"1", "nmprimary_dhcp4_option_requested_domain_name_servers"=>"1", "nmprimary_dhcp4_option_domain_name_servers"=>"192.33.169.12 192.33.49.210", "nmprimary_dhcp4_option_requested_ms_classless_static_routes"=>"1", "nmprimary_dhcp4_option_subnet_mask"=>"255.255.255.192", "nmprimary_dhcp4_option_network_number"=>"192.183.34.0", "nmprimary_dhcp4_option_requested_host_name"=>"1", "nmprimary_dhcp4_option_requested_nis_domain"=>"1", "nmprimary_ip6_address"=>"fe80::d294:66ff:fe4b:71b1/64", "nmprimary_ip6_gateway"=>"", "lldp_neighbor_chassisid_em1"=>"c0:42:d0:57:d1:a0", "lldp_neighbor_portid_em1"=>"xe-0/0/1", "lldp_neighbor_sysname_em1"=>"sjc04-spi-pod4-data01-au29", "lldp_neighbor_mngaddr_ipv4_em1"=>"192.178.31.22", "lldp_neighbor_pvid_em1"=>409, "lldp_neighbor_mtu_em1"=>"1514", "foreman_organization"=>"Linux", "discovery_proxy_uri"=>"https://proxy.example.com:8443", "discovery_proxy_type"=>"proxy", "_type"=>:foreman_discovery}
2018-05-30 16:17:36 c218a00f [app] [D] ERF42-1064 [Foreman::Exception]: Unable to assign subnet, primary interface is missing IP address
2018-05-30 16:17:36 c218a00f [app] [D] Body: {"message":"ERF42-1064 [Foreman::Exception]: Unable to assign subnet, primary interface is missing IP address"}
2018-05-30 16:17:36 c218a00f [app] [I] Completed 422 Unprocessable Entity in 678ms (Views: 0.3ms | ActiveRecord: 228.9ms)

What’s interesting on demo lab everything works just fine :confused:

Hi, is this PXE boot of discovery or PXE-less? Just to doublecheck.

In any case, “ipaddress” fact is ignored by discovery plugin because it is unreliable - some facter versions were unable to set it properly. The plugin looks this way:

  • Finds “discovery_bootif” fact which holds NIC name it was booted from (PXE) or primary NIC which was selected manually (PXE-less)
  • Finds “macaddress_XXX” and “ipaddress_XXX” facts to grab MAC and IP
  • Finds subnet for given IP address and associate it (this is where it fails for you)
  • Assigns hostname and recognizes NICs
  • Saves discovered host

Lots of things are configurable:

  • discovery_fact setting controls fact to use for NIC identification (set to discovery_bootif by default)
  • discovery_hostname setting controls fact to use for discovered host (ditto)
  • discovery_prefix setting holds prefix for above (“mac” by default)

So you have two choices. If you want to rely on “macaddress”, set this via “discovery_fact” and “discovery_hostname” but make sure your facter version reports the correct interface as “primary”. Second, you can investigate why discovery is not recognizing IP address - is it sent via facts? We are tracking some bugs if you try to use bonds or vlans.

We have couple of bugs:

http://projects.theforeman.org/issues/16449

Oh I think you are actually hitting this one:

https://projects.theforeman.org/issues/23224

Can you confirm? Edit: I need to take a closer look on this one, my idea is that subnet and host organization (taxonomy) don’t match.

So after quick look I think the error is correct, but I agree the presentation should be better.

Discovered host cannot be created with NIC(s) in subnet taxonomy that does not belong to discovered host subnet taxonomy. And discovered host taxonomy is determined by fact, setting or subnet taxonomy. Does it make any sense? Example:

  • discovered host is assigned org X (by fact, setting or provisioning subnet taxonomy)
  • one of discovered NICs is detected to be in subnet with org Y
  • discovered host does NOT have org Y assigned
  • error is raised during NIC save
  • discovery host is unable to save
  • fatal error is returned

One of the solutions might be to add all subnets taxonomy to discovered host.

Correction, (discovered) hosts can be assigned only one organization and location while subnets can have multiple. The solution I proposed is not possible, we need to error out.

I found the root problem. When a network assigned to organization and option: update subnets from facts = yes, the error above persists.
So switching the option to no fixed the problem.
Thanks!

Or simply correct your taxonomy so discovered host taxonomy is assigned to all subnets you discover NICs in.

I checked.
I have 4 nics + ipmi.
1 NIC has network assigned + ipmi. I don’t have network for ipmi. 1st interface assigned to org which supposed to own the host. No 2nd organization is involved, but with update subnets from facts I see the error.

Interfaces are not assigned to orgs, it’s subnets. Can you elaborate your setup so I can reproduce it? I don’t understand so far :slight_smile:

Sorry for the confusion.
I was able to easy reproduce this on my lab.

  1. Create an Organization
  2. Create a subnet into this organization
  3. Enable Update subnets from facts -> Yes
  4. Do discovery with the network from #2
  5. You’ll see an error 500 Discovery failed: ERF-42-1064

Hope this helps!
Thank you