Project

General

Profile

Bug #23224

Update subnets from facts breaks discovery

Added by Lukas Zapletal 6 months ago. Updated 3 months ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Discovery plugin
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
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

Related to Foreman - Feature #23768: Fact parser flag keep_subnet to prevent subnet override during fact uploadClosed2018-06-01

Associated revisions

Revision ae5b4b94 (diff)
Added by Lukas Zapletal 4 months ago

Fixes #23224 - keep_subnet flag to prevent subnet override (#436)

History

#1 Updated by Ido Kanner 6 months ago

  • Assignee set to Ido Kanner

#2 Updated by Ido Kanner 6 months ago

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

PUT /discovered_hosts/:id/

Am I correct with my understanding?

#3 Updated by Lukas Zapletal 6 months 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.

#4 Updated by The Foreman Bot 6 months ago

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

#5 Updated by Lukas Zapletal 6 months ago

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

#6 Updated by Lukas Zapletal 5 months ago

  • Priority changed from Normal to High

#7 Updated by Lukas Zapletal 5 months 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.

#8 Updated by Lukas Zapletal 5 months ago

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

#9 Updated by The Foreman Bot 5 months ago

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

#10 Updated by Lukas Zapletal 4 months ago

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

#11 Updated by Lukas Zapletal 3 months ago

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

Also available in: Atom PDF