Project

General

Profile

Actions

Bug #7384

open

Foreman creates duplicate hosts based on incorrect facter 'fqdn' resolution

Added by Stephen Benjamin about 10 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Importers
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1129463
Description of problem:
When facter 'fqdn' fact resorts to resolving the domain name from resolv.conf (hostname -f fails), and resolv.conf searches a different domain, a duplicate host will be created, and the host will be stuck in a build loop because the token becomes associated to the new host created by the fact importer.

Version-Release number of selected component (if applicable):
6.0.4 Snap 4

How reproducible:
Always

Steps to Reproduce:
1. Create a new host in Satellite with a different domain than what the DHCP server returns for resolv.conf search/domain

2. Let the host build - when puppet reports for the first time, it will create a new host based on the report upload

3. foreman_built URL call fails

Actual results:

Given newhost123.unicorns.com, with resolv.conf containing:

search rainbows.net
nameserver 1.2.3.4
nameserver 1.2.3.4

And hostname -f returning (no DNS, no /etc/hosts record)

hostname: Unknown host

Foreman will create newhost123.rainbows.net, due to Facter's poor FQDN resolution techniques.

You will have newhost123.rainbows.net (dupe) and newhost123.unicorns.com (original). Foreman_built call will fail.

Expected results:
Foreman report upload relies on certname first. This seems to be a regression from upstream bug http://projects.theforeman.org/issues/1938

Additional info:

Possible fix ideas:

  • Report uploading relies on certname first - why is believing facter FQDN?
  • Default templates create a record in /etc/hosts (fixhosts snippet used for image providers)

Files

foreman_double.png View foreman_double.png 7.08 KB foreman double Slava Bendersky, 11/21/2014 09:32 AM

Related issues 1 (1 open0 closed)

Related to Foreman - Bug #10366: Foreman allows to create invalid hosts upon facts uploadNew05/05/2015Actions
Actions

Also available in: Atom PDF