Do not cache initial 10 facter runs on discovered node
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 over 7 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 over 7 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.
#3 Updated by Rene Visser over 7 years ago
Other suggestion would be to call a Facter.clear every now and then in the discovery-register while true loop.
Because now the service keeps sending the cached facts (wich in fact could change)
#4 Updated by Lukas Zapletal over 7 years ago
- Tracker changed from Support to Bug
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman-discovery-image/pull/23 added
#5 Updated by Rene Visser over 7 years ago
adapted pull request
Facter cache now cleared first 10 times.
We have also discovered that changes since 2.1 stable had a positive influence on our issue.
probably commit 7618547 has already fixed our problem.
#6 Updated by Lukas Zapletal over 7 years ago
- Subject changed from Unable to assign subnet, primary interface is missing IP address to Do not cache initial 10 facter runs on discovered node
- Priority changed from High to Normal
- Target version set to Discovery Plugin 5.0.0
#7 Updated by Lukas Zapletal over 7 years ago
- Category changed from Discovery plugin to Image
- Target version changed from Discovery Plugin 5.0.0 to Discovery Image 3.0.0
#8 Updated by Lukas Zapletal about 7 years ago
- Status changed from Ready For Testing to Closed
This is now upstream.
Fixes #11678 - Do not cache initial 10 facter runs on discovered node