Bug #16105

DNS entries are not created if discovery hostname is the same as the provisioned (managed) host name

Added by Imri Zvik almost 2 years ago. Updated over 1 year ago.

Status:Closed
Priority:Low
Assigned To:Imri Zvik
Category:Discovery plugin
Target version:-
Difficulty: Pull request:https://github.com/theforeman/foreman_discovery/pull/297
Bugzilla link:
Story points-
Velocity based estimate-

Description

For example, if the hostname of the discovered host is 'foo.example.com' (coming from custom fact, for example), and that is the hostname you provision the host, and use the IP already allocated to the machine in the discovery process (by DHCP), Orchestration::DNS.pending_dns_record_changes? will return false, and thus will not create DNS records for the host.
I see few possibilities for remediation:
  1. Make pending_dns_record_changes? actually check for the existence of the DNS records too
  2. Queue rebuild_dns in the discovered host controller (optionally only if pending_dns_record_changes? returns false
  3. Add transient attribute to the NIC or host model (force_dns_rebuild ?), that we can check in Orchestration::DNS.queue_dns and if it is true - queue rebuild_dns

Any thoughts?

Associated revisions

Revision fe529727
Added by Imri Zvik over 1 year ago

Fixes #16105 - Force DNS rebuild when provisioning discovered host

History

#1 Updated by Lukas Zapletal almost 2 years ago

  • Priority changed from Normal to Low

I'd queue rebuild_dns (B option).

For the record, this does only happen if you explicitly associate domain.

#2 Updated by Imri Zvik almost 2 years ago

  • Assigned To set to Imri Zvik

#3 Updated by The Foreman Bot almost 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_discovery/pull/297 added

#4 Updated by Imri Zvik over 1 year ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF