Discovery status failure (422 unable to find primary NIC)

@jfwl I just booted FDI and when I do scl enable tfm -- facter I do see networking-ip and networking-ip6 facts which are required for Discovery. Can you tell why your facter does not show them? Facter version on my FDI is 4.0.44.

@ekohl do you have an idea why these important fact would not be present? I always see them.

@jfwl The new FAILURE ā€œname already takenā€ means that the discovery process is working now. Unfortunately, when the discovery process was failing earlier, Foreman registered the mac address of the machine that is receiving the failure, but didnā€™t complete the ā€œdiscovered hostsā€ portion of the registration. If this is on VMware, you can manually assign the VM a new MAC address, which will resolve the issue if you are testing. Or you can remove it from the Foremans hosts. @lzap Indicated this machine should show up in the any Org any Location hosts section. Unfortunately for me it didnā€™t show up there, and I just gave them new Mac addresses.

1 Like

@lzap no, that is odd. I canā€™t explain why that would be missing. That looks like a bug. From the code I canā€™t really explain it but Iā€™m not too familiar with it. This needs more serious debugging.

I think it might be actually missing route. Briefly looking into facter codebase it looks like if here is no route then it will not include some facts. And those missing are actually from the primary interface.

OP please can you check if you have the default route? That might be it.

@lzap Default route from DHCP or in the subnet section of Foreman?

In my installation, there is no default route (no ingress/egress).

This, apparently Puppetlabs Facter does not include the facts in the ā€œnetworkingā€ tree when there is no default route. Core parser ignores this (not big deal for inventory) but discovery relies on that behavior and it fails.

Iā€™ve updated the issue: Bug #31826: Discovered nodes without default route cannot be processed - Discovery - Foreman

@lzap Understood. Appreciate the heads up.