Project

General

Profile

Actions

Bug #23224

closed

Update subnets from facts breaks discovery

Added by Lukas Zapletal over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Discovery plugin
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Setting "Update subnets from facts" makes discovery impossible, error is "Unable to assign subnet, primary interface is missing IP address" with warning "Subnet is not defined for host's organization" in logs.


Related issues 1 (0 open1 closed)

Related to Foreman - Feature #23768: Fact parser flag keep_subnet to prevent subnet override during fact uploadClosedLukas Zapletal06/01/2018Actions
Actions #1

Updated by Ido Kanner over 6 years ago

  • Assignee set to Ido Kanner
Actions #2

Updated by Ido Kanner over 6 years ago

Just to make sure, it is about the following request:

PUT /discovered_hosts/:id/

Am I correct with my understanding?

Actions #3

Updated by Lukas Zapletal over 6 years ago

No, that endpoint is actually unused we should consider removing it in V3. The one you are lookging for is: /api/v2/discovered_hosts/facts

https://github.com/theforeman/foreman_discovery/blob/develop/extra/discover-host

Try the script yourself, will discovery you a "fake" host, you can provision the fake host if you disable "discovery_reboot" option in administer settings.

Actions #4

Updated by The Foreman Bot over 6 years ago

  • Pull request https://github.com/theforeman/foreman_discovery/pull/429 added
Actions #5

Updated by Lukas Zapletal over 6 years ago

  • Pull request deleted (https://github.com/theforeman/foreman_discovery/pull/429)
Actions #6

Updated by Lukas Zapletal over 6 years ago

  • Priority changed from Normal to High
Actions #7

Updated by Lukas Zapletal over 6 years ago

So it not like the setting breaks discovery, this is because your subnet is not in hosts taxonomy. Can you check please? For example if you discover a host that does belong to subnet with org A and there is one or more NICs detected in subnet which don't have org A, this error is thrown.

Actions #8

Updated by Lukas Zapletal over 6 years ago

  • Related to Feature #23768: Fact parser flag keep_subnet to prevent subnet override during fact upload added
Actions #9

Updated by The Foreman Bot over 6 years ago

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

Updated by Lukas Zapletal over 6 years ago

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

Updated by Lukas Zapletal over 6 years ago

  • Target version set to Discovery Plugin 13.0
  • Triaged set to No
Actions

Also available in: Atom PDF