Do not cache initial 10 facter runs on discovered node
|Target version:||Image 3.0.0|
|Velocity based estimate||-|
Im fairly new to discovery and provisioning on Bare Metal, but we are trying to discover a host which is pxe booting OK with the 2.1.1 FDI
via discovery proxy (version 1.0.2) it is publishing its facts to foreman (with discovery plugin 4.0.0) and in the foreman production.log we found the Host Discovery Failed.
After I put foreman in debug mode I captured the next Debug message:
Unable to assign subnet, primary interface is missing IP address
I've already logged in with ssh on host and saw there is a discovery_bootif fact. this was also logged in the foreman production.log
Why is Foreman unable to discover this host, and how can I debug this issue?
can anyone help me with this issue?
#1 Updated by Rene Visser almost 3 years ago
after we do a discvover-register on the host it is discovered by foreman
some facts about the interfaces also have changed. So in the boot proces of the host the image sends some facts which are not correct at that time.
do we need to delay this and can we?
#2 Updated by Rene Visser almost 3 years ago
created pull request https://github.com/theforeman/foreman-discovery-image/pull/23
start discovery-register service after network-online, because interfaces have to be renamed before starting the service.
Facter caches the facts and would otherwise hold the initial interface names (ethx). And the service keeps sending these (wrong) interface names.
This causes foreman to be unable to discover the host with (Debug) message: "Unable to assign subnet, primary interface is missing IP address"
I'm not really shure this is the right solution for this problem, but it did fix it for our situation.