Project

General

Profile

Actions

Bug #21239

closed

Discovery fails with Foreman 1.16-RC1 with 422 undefined method ip

Added by Dirk Götz over 6 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Discovery plugin
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Discovery fails on freshly installed 1.16-RC1 with stable and nightly version of tfm-rubygem-foreman_discovery and latest image.

Error on the Discovery image side:

422: {"message":"undefined method `ip' for nil:NilClass"}

Error on the Foreman side:

2017-10-09 09:50:02 076e3a3e [app] [I] Started POST "/api/v2/discovered_hosts/facts" for 10.0.0.101 at 2017-10-09 09:50:02 +0200
2017-10-09 09:41:19 33ae380e [app] [I] Processing by Api::V2::DiscoveredHostsController#facts as JSON
2017-10-09 09:41:19 33ae380e [app] [I]   Parameters: {"facts"=>"[FILTERED]", "apiv"=>"v2", "discovered_host"=>{"facts"=>"[FILTERED]"}}
2017-10-09 09:41:19 33ae380e [audit] [I] [mac525400e376be] deleted 0 (6.7ms)
2017-10-09 09:41:19 33ae380e [audit] [I] [mac525400e376be] updated 0 (1.7ms)
2017-10-09 09:41:19 33ae380e [audit] [I] [mac525400e376be] added 168 (397.3ms)
2017-10-09 09:41:19 33ae380e [app] [I] Import facts for 'mac525400e376be' completed. Added: 168, Updated: 0, Deleted 0 facts
2017-10-09 09:41:21 33ae380e [app] [W] Saving eth0 NIC for host mac525400e376be failed, skipping because:
2017-10-09 09:41:21 33ae380e [app] [W]  Identifier has already been taken
2017-10-09 09:41:21 33ae380e [app] [W] Host discovery failed, facts: {"lib"=>"/usr/share/fdi/facts:/opt/extension/facts", "netmask"=>"255.255.0.0", "fqdn"=>"fdi.localdomain", "domain"=>"localdomain", "bios_vendor"=>"Seabios", "bios_version"=>"0.5.1", "bios_release_date"=>"01/01/2011", "manufacturer"=>"Red Hat", "productname"=>"KVM", "serialnumber"=>"Not Specified", "uuid"=>"BBF1C493-48BD-481B-BEE4-6ED23730B207", "type"=>"Other", "hostname"=>"fdi", "selinux"=>false, "gid"=>"root", "interfaces"=>"eth0,lo", "ipaddress_eth0"=>"10.0.0.101", "macaddress_eth0"=>"52:54:00:e3:76:be", "netmask_eth0"=>"255.255.0.0", "mtu_eth0"=>1500, "ipaddress_lo"=>"127.0.0.1", "netmask_lo"=>"255.0.0.0", "mtu_lo"=>65536, "virtual"=>"kvm", "is_virtual"=>true, "architecture"=>"x86_64", "hardwaremodel"=>"x86_64", "os"=>{"name"=>"CentOS", "family"=>"RedHat", "release"=>{"major"=>"7", "minor"=>"3", "full"=>"7.3.1611"}}, "processors"=>{"models"=>["Intel Core i7 9xx (Nehalem Class Core i7)"], "count"=>1, "physicalcount"=>1}, "processor0"=>"Intel Core i7 9xx (Nehalem Class Core i7)", "processorcount"=>1, "network_eth0"=>"10.0.0.0", "network_lo"=>"127.0.0.0", "facterversion"=>"2.4.1", "blockdevice_vda_size"=>21474836480, "blockdevice_vda_vendor"=>"0x1af4", "blockdevices"=>"vda", "sshrsakey"=>"AAAAB3NzaC1yc2EAAAADAQABAAABAQCzHT0XAq0usdKRAGBdH9S1es08g6vBXqTA3o/HTNaee010G3V1N2tYdMKaa1OBOlc3lU6UgMx6Jzvw6GRWqdWvRbSGcOlzFHq6gVf3WHNAyPm6oLQ0u7I6epzzt+/r1FG/8/RNAgnWr6wDpqxUMZvlZPH3fh4+Bw0qtOalTpVXnUs9HEfk13mL7HaIrUb778NBshonXLODZa2pr9z2RjcZCIBEzIitwjJTx4AeqAIIAiJjvFHsR89mcDCkYb0tsZPyqbyqkDsVD3w1OZquPECygFY6LiroY08pP2UbTpbV7fg/QzS6fNxB+X8ABUXkc03od4Qs81SBI0/Nc0R5BX0b", "sshfp_rsa"=>"SSHFP 1 1 0b648ad505ebc5284e23ee0ef6017bf20a2efe50\nSSHFP 1 2 08d125e2c677b85f785f3b092c9b47f111e7c694acdd1532bb2e8b6ead3b8793", "sshecdsakey"=>"AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBADW7mjUXfHZj/eHfv+B3LWOrNkm4UiE52nuFfrR49EVPnibj3CojAOFh5W5HxWRyqY7tASgUE0R8+eJ1T5YxhI=", "sshfp_ecdsa"=>"SSHFP 3 1 8eab9c4908a8051ca836e2aa0464aae00b61b694\nSSHFP 3 2 3e3f8cb71ef86f68cee0dc40671b8f60d9493afb2e2f6c37defef6419b9344b2", "sshed25519key"=>"AAAAC3NzaC1lZDI1NTE5AAAAIMuJJpgrahGzFtaq+eqxIKaZvbZfhuIVJADfeIhoKXIH", "sshfp_ed25519"=>"SSHFP 4 1 eb3b8138fca2f496631dd8b409356e1b8bbb8703\nSSHFP 4 2 0b41b5118c23a723a27d1eeae59eea6047384c9baef3e3b4f441f2f227862fcd", "macaddress"=>"52:54:00:e3:76:be", "dhcp_servers"=>{"system"=>"10.0.0.2", "eth0"=>"10.0.0.2"}, "ps"=>"ps -ef", "ipaddress"=>"10.0.0.101", "physicalprocessorcount"=>1, "uniqueid"=>"000a6500", "id"=>"root", "hardwareisa"=>"x86_64", "memorysize"=>"992.67 MB", "memorysize_mb"=>"992.67", "discovery_version"=>"3.4.1", "discovery_release"=>"20170721.1", "discovery_bootif"=>"52:54:00:e3:76:be", "discovery_bootip"=>"10.0.0.101", "link_eth0"=>"true", "link_lo"=>"true", "nmprimary_connection_id"=>"primary", "nmprimary_connection_uuid"=>"bd87118e-acc1-11e7-bcdb-525400e376be", "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_read-only"=>"no", "nmprimary_connection_permissions"=>"", "nmprimary_connection_zone"=>"--", "nmprimary_connection_master"=>"--", "nmprimary_connection_slave-type"=>"--", "nmprimary_connection_autoconnect-slaves"=>"-1 (default)", "nmprimary_connection_secondaries"=>"", "nmprimary_connection_metered"=>"unknown", "nmprimary_connection_lldp"=>"-1 (default)", "nmprimary_802-3-ethernet_port"=>"--", "nmprimary_802-3-ethernet_speed"=>"0", "nmprimary_802-3-ethernet_duplex"=>"--", "nmprimary_802-3-ethernet_auto-negotiate"=>"yes", "nmprimary_802-3-ethernet_mac-address"=>"52:54:00:E3:76:BE", "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"=>"1 (default)", "nmprimary_802-3-ethernet_wake-on-lan-password"=>"--", "nmprimary_ipv4_method"=>"auto", "nmprimary_ipv4_dns"=>"", "nmprimary_ipv4_dns-search"=>"", "nmprimary_ipv4_dns-options"=>"(default)", "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"=>"(default)", "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 (unknown)", "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 (REORDER_HEADERS)", "nmprimary_vlan_ingress-priority-map"=>"", "nmprimary_vlan_egress-priority-map"=>"", "nmprimary_general_name"=>"primary", "nmprimary_general_uuid"=>"bd87118e-acc1-11e7-bcdb-525400e376be", "nmprimary_general_devices"=>"eth0", "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"=>"10.0.0.101/16", "nmprimary_ip4_gateway"=>"10.0.0.1", "nmprimary_ip4_dns"=>"10.0.0.2", "nmprimary_ip4_domain"=>"localdomain", "nmprimary_dhcp4_option_requested_routers"=>"1", "nmprimary_dhcp4_option_requested_domain_search"=>"1", "nmprimary_dhcp4_option_dhcp_server_identifier"=>"10.0.0.2", "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"=>"10.0.0.2", "nmprimary_dhcp4_option_broadcast_address"=>"10.0.255.255", "nmprimary_dhcp4_option_requested_interface_mtu"=>"1", "nmprimary_dhcp4_option_requested_subnet_mask"=>"1", "nmprimary_dhcp4_option_expiry"=>"1507576583", "nmprimary_dhcp4_option_dhcp_message_type"=>"5", "nmprimary_dhcp4_option_ip_address"=>"10.0.0.101", "nmprimary_dhcp4_option_routers"=>"10.0.0.1", "nmprimary_dhcp4_option_domain_name"=>"localdomain", "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"=>"10.0.0.2", "nmprimary_dhcp4_option_requested_ms_classless_static_routes"=>"1", "nmprimary_dhcp4_option_subnet_mask"=>"255.255.0.0", "nmprimary_dhcp4_option_network_number"=>"10.0.0.0", "nmprimary_dhcp4_option_requested_host_name"=>"1", "nmprimary_dhcp4_option_requested_nis_domain"=>"1", "nmprimary_ip6_address"=>"fe80::5054:ff:fee3:76be/64", "nmprimary_ip6_gateway"=>"", "discovery_proxy_uri"=>"https://foreman.localdomain", "discovery_proxy_type"=>"foreman"}
2017-10-09 09:41:21 33ae380e [app] [I] Completed 422 Unprocessable Entity in 2340ms (Views: 0.4ms | ActiveRecord: 394.5ms)

Actions #1

Updated by Lukas Zapletal over 6 years ago

Discovery is broken with RC1 completely, we are working on releasing new major version.

Actions #2

Updated by Dirk Götz over 3 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF