Project

General

Profile

Actions

Bug #10366

open

Foreman allows to create invalid hosts upon facts upload

Added by Marek Hulán almost 9 years ago. Updated almost 9 years ago.

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

Description

I just saw following scenario:

  1. User creates a new host a.example.com with IP 192.168.0.1
  2. Provisioning setups puppet on this host, so puppet uploads facts to Foreman
  3. Unfortunately the host hostname is different than user created (e.g. b.example.net) so it gets successfully created in Foreman
  4. User tries to edit a.example.com but he sees validation error that IP address is already taken, which is true because b.example.net has the very same IP

When organizations are in use it's even more complicated to find out the reason, because newly created hosts ends up in global context by default so the user does not see conflicting host. DNS orchestration seems to be set correctly. While the DNS misconfiguration might not be Foreman issue, the bug is that Foreman does not run validations when saving the host. This makes DB in inconsistent state. During fixing this maybe we could refactor multiple save calls during one action, one ought to be enough for anybody. The hostname resolution issue seems to be caused by wrong DHCP configuration that sets the provisioned host domain to example.net instead of example.com.

Saves that should be fixed:

Related issues 1 (1 open0 closed)

Related to Foreman - Bug #7384: Foreman creates duplicate hosts based on incorrect facter 'fqdn' resolutionNew09/09/2014Actions
Actions #1

Updated by Marek Hulán almost 9 years ago

  • Related to Bug #7384: Foreman creates duplicate hosts based on incorrect facter 'fqdn' resolution added
Actions

Also available in: Atom PDF