Project

General

Profile

Feature #16890

Prevent host discovery for existing MAC/IP addresses

Added by Andrew Blatt over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Low
Category:
Discovery plugin
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Ran into a situation where someone deleted the pxe/macfile from tftpserver. This allowed server to use default pxe file that says to boot into discovery image. When discovery image boots, it should check if ip/mac already exists in host table, and if so, don't add into discovered_hosts table. When this occurs and I remove the entry from discovered_hosts, the existing host entry loses its FACTs information.


Related issues

Related to Discovery - Bug #17260: Discovered (7.0) host does not delete with error "undefined method `operatingsystem'"Closed2016-11-07
Related to Discovery - Bug #23174: Do not prevent host discovery for existing MAC/IP addressesClosed2018-04-09

Associated revisions

Revision 210f143b (diff)
Added by Lukas Zapletal about 6 years ago

Fixes #16890 - prevent discovery of managed hosts

History

#1 Updated by Dominic Cleal over 6 years ago

  • Project changed from Foreman to Discovery
  • Category deleted (Inventory)

#2 Updated by Lukas Zapletal over 6 years ago

  • Subject changed from Prevent host booting into discovery from registration if server already exists in host table. to Prevent host discovery for existing MAC/IP addresses
  • Category set to Discovery plugin
  • Priority changed from Normal to Low

Well this is quite special case when someone delete file on TFTP server. If this gets ever implemented, this must be an opt-in setting (each MAC and IP). Only provisioning NICs must be matched as well.

#3 Updated by Lukas Zapletal about 6 years ago

  • Related to Bug #17260: Discovered (7.0) host does not delete with error "undefined method `operatingsystem'" added

#4 Updated by Lukas Zapletal about 6 years ago

Experienced this today, when existing (managed) host does exist and it boots into Discovery mode, existing host is "converted" into discovered host, facts are deleted. But what's more important, the host is in error state and cannot be deleted (workaround is via rake console). I will make a patch to prevent to discover an existing server.

#5 Updated by The Foreman Bot about 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Lukas Zapletal
  • Pull request https://github.com/theforeman/foreman_discovery/pull/324 added

#6 Updated by Anonymous about 6 years ago

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

#7 Updated by Lukas Zapletal almost 6 years ago

  • Target version set to Discovery Plugin 8.0.1

#8 Updated by Lukas Zapletal almost 5 years ago

  • Related to Bug #23174: Do not prevent host discovery for existing MAC/IP addresses added

Also available in: Atom PDF