Created attachment 936271 [details] Screenshot from the console of the machine with the error Rubygem-Staypuft: Error in the discovery image: "Validation failed: IP address Can't use the same value as the primary interface." Environment: rhel-osp-installer-0.3.4-2.el6ost.noarch ruby193-rubygem-foreman_openstack_simplify-0.0.6-8.el6ost.noarch openstack-foreman-installer-2.0.23-1.el6ost.noarch openstack-puppet-modules-2014.1-21.8.el6ost.noarc Steps to reproduce: 1. Install rhel-osp-installer. 2. Boot machine to discovery mode. Result: There's an error reported in the discovery image: Validation failed: IP address Can't use the same value as the primary interface Eventually the NICs aren't seen in the foreman, and network configuration isn't possible - clicking on "Configure Network" button for the assigned hosts shows no NICs. Expected result: No errors should be reported in the discovery image.
Used this RPM: foreman-discovery-image-6.5-20140620.2.el6sat.noarch.rpm instead of foreman-discovery-image-7.0-20140905.0.2.el7sat.noarch. No error reported on the console. With that said still have the issue with: the NICs not shown in the foreman, and network configuration isn't possible - clicking on "Configure Network" button for the assigned hosts shows no NICs.
I found that this happened on a couple of my VMs, but only when the nic type was virtio. I had switched most nics to rtl8139 instead to take advantage of net.ifnames, but the couple that hadn't been switch failed in this way. Switching them to rtl8139 resolved the problem.
Sasha, you said you were testing on bare metal. Did it work there?
Tried to deploy it on bare metal - HW model: Dell PowerEdge R320. Ran into the same exact issues. I was also contacted by another colleague who has the same errors - he also tried to deploy on bare metal.
Could some of you please try to download debug discovery image (just replace discovery image you have in /var/lib/tftpboot/boot, boot it and when you see the error, login in terminal (alt + f2, root/redhat) and run facter and paste the output here. It would help a lot. Images are to be found at http://downloads.theforeman.org/discovery/. This is likely an issue in foreman when creating NICs. Also how is the IPMI configured on that host, is it dedicated NIC with it's own IP?
On Dell PowerEdge R320 the IPMI uses a dedicated interface.
This is the output from facter executed on a compute node: [root@localhost ~]# facter architecture => x86_64 domain => localdomain facterversion => 1.6.18 fqdn => localhost.localdomain hardwareisa => x86_64 hardwaremodel => x86_64 hostname => localhost id => root interfaces => eth0,eth1,lo ipaddress => 192.168.100.254 ipaddress_eth0 => 192.168.100.254 ipaddress_eth1 => 192.168.0.9 ipaddress_lo => 127.0.0.1 is_virtual => true kernel => Linux kernelmajversion => 2.6 kernelrelease => 2.6.32-431.17.1.el6.x86_64 kernelversion => 2.6.32 lsbdistcodename => RedHatEnterpriseVirtualizationHypervisor lsbdistdescription => RedHatEnterpriseVirtualizationHypervisor lsbdistid => RedHatEnterpriseVirtualizationHypervisor lsbdistrelease => Release: lsbmajdistrelease => Release: lsbrelease => RedHatEnterpriseVirtualizationHypervisor macaddress => B2:54:00:1C:5C:B7 macaddress_eth0 => B2:54:00:1C:5C:B7 macaddress_eth1 => A2:54:00:86:80:96 manufacturer => Red Hat memoryfree => 3.49 GB memorysize => 3.65 GB memorytotal => 3.65 GB mtu_eth0 => 1500 mtu_eth1 => 1500 mtu_lo => 16436 netmask => 255.255.255.0 netmask_eth0 => 255.255.255.0 netmask_eth1 => 255.255.255.0 netmask_lo => 255.0.0.0 network_eth0 => 192.168.100.0 network_eth1 => 192.168.0.0 network_lo => 127.0.0.0 operatingsystem => RedHat operatingsystemrelease => 3.0.5 osfamily => RedHat path => /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin physicalprocessorcount => 2 processor0 => Westmere E56xx/L56xx/X56xx (Nehalem-C) processor1 => Westmere E56xx/L56xx/X56xx (Nehalem-C) processorcount => 2 productname => KVM ps => ps -ef rubysitedir => /usr/lib/ruby/site_ruby/1.8 rubyversion => 1.8.7 selinux => false serialnumber => Not Specified sshdsakey => AAAAB3NzaC1kc3MAAACBAJpGZ3Ik9Jf5nySQBcBQhbQmVwjlkWf4sLTzihbK0GbMuGZbVBwAoSvI+RseA6kzDKayayyFw8PQVwrmN4sZ5Qi6u6NXdX4yzC4Rw9dRZZI7LVqEYWBtohx0GZubNsApvcvvrOcfctm3W+DppREAJzVgmitAYez143e6GMbpAcJHAAAAFQCMmbRho9UY5GIITVnwvzjosB2uPQAAAIAiaenX0Sckng3dhYfqiCHk8GW1UbSyYS0Cqp9pJY3cNOO5b6WAhOYsBeNlyXW+ZIsklHqAerAjP+yToz0iZ0vb/ebCs3PfbOuTzFoaPHJj4z0AM8hznol7MOC7gG26S3lYUVb241hHbh5bl/OlPeQS+AAWjJELr1EztYaMY+5gXgAAAIBUcilinkh0kSOLSGci4Vu5Vyngln6++PFrxKagz6LbHcV5sBoWEZXUgCflVoDKNlQ/wtCdSVmgccvXK8Fa3M7Kj6OgAloqDd+RG/deD6KQSXtfccKDhRQ68uvBEXiOUiKgDC1iiXbl8SVgV42hW2FqjZm8c0FrnDm6j9Sx6SdavA== sshrsakey => AAAAB3NzaC1yc2EAAAABIwAAAQEAyoHrNBwiL9B4aOHZHleHLK6ofqmK0FR/iSgOwEWifkuDp8Ukc7RlNcNclHgrn+T5byoD6RH3IvMhMF6Xm8EWeTolG9431Y0Wc/WQgLzXG73oHvaRBwK0kiNQeSC+37ax/tFAca02Cfh6LN9Tbkgdr1yqAEsjFG/zevoXZNk4dlV7JCYzMaNY2Smz+en7MMJsnM48/tUybniPjXUkaIYDRp9nfu+gqV/ltKwW2ECzl+L4IEqhjYdQ92DFRJjTsXhK6xePWL8ScC9/4dNEeeQA7Ql8GpEbw00lBvoFQQduD0LfYYQKhP4PMY5+fwWHHpeO3phX3+41RPo81TMAsqynIQ== swapfree => 0.00 kB swapsize => 0.00 kB timezone => UTC type => Other uniqueid => 007f0100 uptime => 0:03 hours uptime_days => 0 uptime_hours => 0 uptime_seconds => 212 virtual => kvm
Below is the output from the facter command executed on the controller: [root@dhcp-8-29-45 ~]# facter architecture => x86_64 domain => lab.eng.rdu2.redhat.com facterversion => 1.6.18 fqdn => dhcp-8-29-45.lab.eng.rdu2.redhat.com hardwareisa => x86_64 hardwaremodel => x86_64 hostname => dhcp-8-29-45 id => root interfaces => eth0,eth1,lo ipaddress => 10.8.29.45 ipaddress6 => 2620:52:0:800:5054:ff:fe3f:8d59 ipaddress6_eth0 => 2620:52:0:800:5054:ff:fe3f:8d59 ipaddress_eth0 => 10.8.29.45 ipaddress_eth1 => 192.168.0.10 ipaddress_lo => 127.0.0.1 is_virtual => true kernel => Linux kernelmajversion => 2.6 kernelrelease => 2.6.32-431.17.1.el6.x86_64 kernelversion => 2.6.32 lsbdistcodename => RedHatEnterpriseVirtualizationHypervisor lsbdistdescription => RedHatEnterpriseVirtualizationHypervisor lsbdistid => RedHatEnterpriseVirtualizationHypervisor lsbdistrelease => Release: lsbmajdistrelease => Release: lsbrelease => RedHatEnterpriseVirtualizationHypervisor macaddress => 52:54:00:3F:8D:59 macaddress_eth0 => 52:54:00:3F:8D:59 macaddress_eth1 => A2:54:00:70:28:75 manufacturer => Red Hat memoryfree => 1.69 GB memorysize => 1.83 GB memorytotal => 1.83 GB mtu_eth0 => 1500 mtu_eth1 => 1500 mtu_lo => 16436 netmask => 255.255.224.0 netmask_eth0 => 255.255.224.0 netmask_eth1 => 255.255.255.0 netmask_lo => 255.0.0.0 network_eth0 => 10.8.0.0 network_eth1 => 192.168.0.0 network_lo => 127.0.0.0 operatingsystem => RedHat operatingsystemrelease => 3.0.5 osfamily => RedHat path => /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin physicalprocessorcount => 1 processor0 => QEMU Virtual CPU version 1.5.3 processorcount => 1 productname => KVM ps => ps -ef rubysitedir => /usr/lib/ruby/site_ruby/1.8 rubyversion => 1.8.7 selinux => false serialnumber => Not Specified sshdsakey => AAAAB3NzaC1kc3MAAACBALKztocP/nPzpkWNBc34vLYQ8GxvKMqLvsnX4RHAw5NFH987jK3X0B+oShNC9/GHZRRcEFn9OPTjMDWvJpsvjyptKSaiC6RekeWfInGFMep4zWUd8y7Np/UnUuUAUDaWj/H5gUbS92n8Wd2kMV+COTbc0EwwRMaetNxDvloUeU+3AAAAFQCIP1eApee3/7aHOovbDRqwnNLSrwAAAIEAoakmFHjwkmFSwDEJ0RLcxr955iEJTntfJyjOvatisHpHpQNAWMds9pyjoaije7o9ipt4XVSuegswL7M5NQ4GI7UstldTo5EYbCZXMfAuf5mkC3m3q5scpM1eGcFV5EQ7Gu91KZDwId5cGhdIFbzPBEqF0EyFAZhRE9YbqO32rJYAAACAbwwGYa1uJR8225TlIFOsTTMink3bXX5NrdKz4jkyNLzvm47uQG+utQRaQoWXLe49+xEjvt0ApSVWQcFGqKkCbWK4gRXRFyGj02yLXSu6waFqZoRDDsDIUkyGyovmr6XMfU4W17d8RwNM/ENIETiPo/5pkhuQekjfRbbPLjB7emM= sshrsakey => AAAAB3NzaC1yc2EAAAABIwAAAQEA2cDefobdOJWtx5KJzCugbARQVUQGPLslnR6vnPcBFj9oFoArYmrlfNUv9+/P/buKAKPsUD5aVCUFhybajZdsyY6VIRNB3CVZ1gvZ6IeoO9VwIjdDuD/hiLKlWOjzS8s2eg3ZarT5jLWWytGuPZaAbyOCdfZf0PnyliChcyQryRsNjpJeEkUkiy7Cs4P9K8noWAJUeFlgN24aKl5wbssfE55sQB1Yf4qkOEwwNdpueaqffTfqqkJBSMCGRvsRepYKb0iNVqm5qUuw4JE8wd2Krr4xDGmUj6BNwUpeZHhDmyrdB+cgYQ3SWggq8/DRlBfxg+I4RIcafjgYeXn2Cpllew== swapfree => 0.00 kB swapsize => 0.00 kB timezone => UTC type => Other uniqueid => 080a2d1d uptime => 0:02 hours uptime_days => 0 uptime_hours => 0 uptime_seconds => 175 virtual => kvm
Here's the output from rhel7 discovery image executed on the same controller: [root@dhcp-8-29-45 ~]# facter architecture => x86_64 bios_release_date => 01/01/2011 bios_vendor => Bochs bios_version => Bochs blockdevice_vda_size => 26843545600 blockdevice_vda_vendor => 0x1af4 blockdevices => vda domain => lab.eng.rdu2.redhat.com facterversion => 1.7.6 filesystems => ext2,ext3,ext4,iso9660,squashfs fqdn => dhcp-8-29-45.lab.eng.rdu2.redhat.com hardwareisa => x86_64 hardwaremodel => x86_64 hostname => dhcp-8-29-45 id => root interfaces => ens8,eth1,lo ipaddress => 10.8.29.45 ipaddress6 => 2620:52:0:800:5054:ff:fe3f:8d59 ipaddress6_ens8 => 2620:52:0:800:5054:ff:fe3f:8d59 ipaddress_ens8 => 10.8.29.45 ipaddress_eth1 => 192.168.0.10 ipaddress_lo => 127.0.0.1 is_virtual => true kernel => Linux kernelmajversion => 3.10 kernelrelease => 3.10.0-123.6.3.el7.x86_64 kernelversion => 3.10.0 lsbdistcodename => RedHatEnterpriseVirtualizationHypervisor lsbdistdescription => RedHatEnterpriseVirtualizationHypervisor lsbdistid => RedHatEnterpriseVirtualizationHypervisor lsbdistrelease => Release: lsbmajdistrelease => Release: lsbrelease => RedHatEnterpriseVirtualizationHypervisor macaddress => 52:54:00:3f:8d:59 macaddress_ens8 => 52:54:00:3f:8d:59 macaddress_eth1 => a2:54:00:70:28:75 manufacturer => Red Hat memoryfree => 1.70 GB memoryfree_mb => 1736.69 memorysize => 1.83 GB memorysize_mb => 1874.14 memorytotal => 1.83 GB netmask => 255.255.224.0 netmask_ens8 => 255.255.224.0 netmask_eth1 => 255.255.255.0 netmask_lo => 255.0.0.0 network_ens8 => 10.8.0.0 network_eth1 => 192.168.0.0 network_lo => 127.0.0.0 operatingsystem => RedHat operatingsystemmajrelease => 7 operatingsystemrelease => 7.0 osfamily => RedHat path => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin physicalprocessorcount => 1 processor0 => QEMU Virtual CPU version 1.5.3 processorcount => 1 productname => KVM ps => ps -ef rubysitedir => /usr/local/share/ruby/site_ruby/ rubyversion => 2.0.0 selinux => false serialnumber => Not Specified sshecdsakey => AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPeDDd3R/ZRsy5Kin6LmpRZhDkBlc2YchsbFWo4Y+SER7tCCX/kYi3bjWafjh30HxtxVTup3IBq+AjqtIYixjzk= sshfp_ecdsa => SSHFP 3 1 465ac49423d59b3973ce1ac8e013cb26ae7fdaa2 SSHFP 3 2 78a3557e95d9a230e3d806e1b455027a2d7a459249135fc94b07bc1e0d1685f0 sshfp_rsa => SSHFP 1 1 422d89f9a890ea3c58f0aac73254a3b4e8d8f692 SSHFP 1 2 1e1ff07cf1775bcccee51bff51c0c9e66298624a5973b51a1317726db2d04d9a sshrsakey => AAAAB3NzaC1yc2EAAAADAQABAAABAQDHC4rldi7NKrMcDXbY9qqIIYm+r6r0bkBLMMDtnf6mxLSRm2CVXjYmJvtMCo9h/iOwP0+ziHMkwo2L24Nn6yFnpfst43p2qQBIo0Q0oScSkoCx91RJTPcXZWkVtMw6aOiTXbdam5Sp0VPUtAMnNtdCPqBjmxFIiAeKNoRDFd5w4QDK0wcuOWwGTrzKA39PNdDCCMq4Bs+Tdz6+93s4gymsw57Mv50d54iyF5emi5AIcHrE8X6qjX6Qiq9u0Wf/ekfTY66fzZ2Cn8Nnzx+zjJipIGnZErYqU/ewA9QqEO4NP99Ji7FN+6F76Lv41sn8RAcfr4ksYmymwbups318+9Md swapfree => 0.00 MB swapfree_mb => 0.00 swapsize => 0.00 MB swapsize_mb => 0.00 timezone => UTC type => Other uniqueid => 080a2d1d uptime => 0:03 hours uptime_days => 0 uptime_hours => 0 uptime_seconds => 181 uuid => 7663381E-BD8F-DDF6-D787-DE7915268069 virtual => kvm
Marek -- one thing I"m noticing (which explains why we saw the primary interface yesterday but no nic name) -- although mac addr and ip addr are filled in correctly, host.primary_interface is nil for the discovered hosts. Also, as expected. host.interfaces is empty.
I'm not sure how this is possible unless the IP address for an interface with a *different* mac address than the primary mac is the same as the primary IP, or if, somehow the "mac addresses are equal?" comparison is malfunctioning and foreman is trying to process the primary interface as a secondary one. Is it possible that at an early stage, the primary IP address is set but the primary mac is not? Since the mac isn't set, the primary interface from facter is being processed as if it's a secondary, and complaining on the IP match. Log from the foreman side: Started POST "/api/v2/discovered_hosts/facts" for 192.168.0.10 at 2014-09-11 03:19:00 -0400 Processing by Api::V2::DiscoveredHostsController#facts as JSON Parameters: {"facts"=>"[FILTERED]", "apiv"=>"v2", "discovered_host"=>{"facts"=>"[FILTERED]"}} Import facts for 'maca25400702875' completed. Added: 0, Updated: 0, Deleted 0 facts Validation failed: IP address Can't use the same value as the primary interface (ActiveRecord::RecordInvalid) /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:56:in `save!' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:33:in `save!' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `block in save!' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status' /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `save!' /usr/share/foreman/app/models/host/base.rb:203:in `set_interface' /usr/share/foreman/app/models/host/base.rb:118:in `block in set_interfaces' /usr/share/foreman/app/models/host/base.rb:94:in `each' /usr/share/foreman/app/models/host/base.rb:94:in `set_interfaces' /usr/share/foreman/app/models/host/base.rb:81:in `populate_fields_from_facts' /opt/rh/ruby193/root/usr/share/gems/gems/foreman_discovery-1.3.0/app/models/host/discovered.rb:74:in `populate_fields_from_facts' /usr/share/foreman/app/models/host/base.rb:59:in `import_facts' /opt/rh/ruby193/root/usr/share/gems/gems/foreman_discovery-1.3.0/app/models/host/discovered.rb:66:in `import_facts' /opt/rh/ruby193/root/usr/share/gems/gems/foreman_discovery-1.3.0/app/models/host/discovered.rb:58:in `import_host_and_facts' /opt/rh/ruby193/root/usr/share/gems/gems/foreman_discovery-1.3.0/app/controllers/api/v2/discovered_hosts_controller.rb:90:in `facts'
Can I ask you to paste the facts again, now with this variable set: export FACTERLIB=/usr/share/ovirt-node-plugin-foreman It should add few more facts which are added by discovery, so we can them import this into our development foreman instances. Thanks!
The issue is that facter reports different MAC addresses for facts "macaddress" and "discovery_bootif", while foreman expects the first to determine primary interface. Unfortunately facter chooses the "macaddress" fact value alphabetically and in this case ens is after eth. This has to be fixed in foreman, if there's "discovery_bootif" fact, it should be used to detect primary interface.
https://github.com/theforeman/foreman_discovery/pull/86
Verified:rhel-osp-installer-0.3.4-3.el6ost.noarch The issue doesn't reproduce now.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1350.html