Project

General

Profile

Actions

Bug #11678

closed

Do not cache initial 10 facter runs on discovered node

Added by Rene Visser over 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Image
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

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?

Actions #1

Updated by Rene Visser over 8 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?

Actions #2

Updated by Rene Visser over 8 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.

Actions #3

Updated by Rene Visser over 8 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)

Actions #4

Updated by Lukas Zapletal over 8 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
Actions #5

Updated by Rene Visser over 8 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.

Actions #6

Updated by Lukas Zapletal over 8 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
Actions #7

Updated by Lukas Zapletal over 8 years ago

  • Category changed from Discovery plugin to Image
  • Target version changed from Discovery Plugin 5.0.0 to Discovery Image 3.0.0
Actions #8

Updated by Lukas Zapletal about 8 years ago

  • Status changed from Ready For Testing to Closed

This is now upstream.

Actions

Also available in: Atom PDF