Project

General

Profile

Actions

Bug #16583

closed

error during import_facts when get_interface_scope() returns nil

Added by Thomas McKay over 7 years ago. Updated over 7 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
Category:
Facts
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

In trying to register an atomic host, I get the below error. Is there something wrong with my setup or is this just a case of the code needing to check for nil?

2016-09-16T09:11:09 c4821c57 [katello/cp_proxy] [E] NoMethodError: undefined method `first' for nil:NilClass | /home/vagrant/code/foreman/app/models/host/base.rb:176:in `block in set_interfaces' | /home/vagrant/code/foreman/app/models/host/base.rb:175:in `each' | /home/vagrant/code/foreman/app/models/host/base.rb:175:in `set_interfaces' | /home/vagrant/code/foreman/app/models/host/base.rb:152:in `populate_fields_from_facts' | /home/vagrant/code/foreman/app/models/host/managed.rb:464:in `populate_fields_from_facts' | /home/vagrant/code/foreman/app/models/host/base.rb:129:in `import_facts' | /home/vagrant/code/foreman/app/models/host/managed.rb:305:in `import_facts' | /home/vagrant/code/katello/app/models/katello/host/subscription_facet.rb:80:in `update_facts'

This is on the VM:

-bash-4.2# ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.42.1 netmask 255.255.0.0 broadcast 0.0.0.0
ether 02:42:aa:e2:58:54 txqueuelen 0 (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

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.166 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::5054:ff:fed6:c27d prefixlen 64 scopeid 0x20<link>
ether 52:54:00:d6:c2:7d txqueuelen 1000 (Ethernet)
RX packets 3132 bytes 1306897 (1.2 MiB)
RX errors 0 dropped 3 overruns 0 frame 0
TX packets 933 bytes 192389 (187.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 10 bytes 756 (756.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10 bytes 756 (756.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #16547: Fact importing fails with NoMethodError: undefined method `first' for nil:NilClassClosedDominic Cleal09/14/2016Actions
Actions #1

Updated by Dominic Cleal over 7 years ago

  • Is duplicate of Bug #16547: Fact importing fails with NoMethodError: undefined method `first' for nil:NilClass added
Actions #2

Updated by Dominic Cleal over 7 years ago

  • Status changed from Assigned to Duplicate

Please use the existing ticket.

Actions

Also available in: Atom PDF