Project

General

Profile

Actions

Feature #15468

open

Make new reservations for all interfaces during provisioning

Added by Matt Nicholson over 8 years ago. Updated about 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Discovery plugin
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

(originally from foreman-users thread https://groups.google.com/d/msg/foreman-users/v_Tcs40XE3o/M6dAFjxlAwAJ)

Seems like disjoint dhcp ranges, as desrbribed per the docs, do not work as expected with discovery.

Setup:
1 subnet, with a dhcp range set to 192.168.1.00->192.168.1.200, and the subnet defined in foreman with 192.168.1.5->192.168.1.99 for IP selection.

Expected behavior:
Boot host to discover, host leases ip from dhcp server range (100->200), upon provisioning, foreman selects an ip from its defined range(5->99), and provisions the host with that ip address as if it was a normal host being provisioned (I'll note, this should happen before rendering the hostname from the hostname template, in the case that the hostname is based on the "new" IP address).

Actual behavior:
Boot host to discover, host leases ip from dhcp server range (100->200), upon provisioning, host is transformed directly into a managed host, never getting a new IP address assigned to it (and subsequently the @host facts are strictly based off the discovery (pre-provisioning ) facts, instead using the same (100->200) ip address.

Suggestion to fix is to have a discovery-level settings to toggle this behavior on/off

Actions #1

Updated by Dominic Cleal over 8 years ago

  • Project changed from Foreman to Discovery
  • Category changed from Network to Discovery plugin
Actions #2

Updated by Lukas Zapletal over 8 years ago

It looked like straighforward patch, but it's more complicated than it seems.

To get unused ip, we need to know subnet of the interface. We only detect subnet for primary interface at the moment, therefore we can implement this only for primary interface. But it would be nicer to have this ability for all interfaces as well.

Therefore the logic that finds subnet for primary interface must be extended to find for all of them. We currently carry subnet flag for each discovered host, but it's not necessary since subnet is now part of NIC model.

Also since this is quite big change in how IP address handling works, we need to implement a global setting so users can easily switch between "Keep leases (current behavior)", "New reservation for primary interface" or "New reservations for all interfaces".

Unsure when we get to this. Good catch, thanks for the report.

Actions #3

Updated by Lukas Zapletal over 8 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from Disjoint dhcp range(s) for discovery not working as expected to Make new reservations for all interfaces during provisioning

Initially this was reported as an error for disjoint leases, but it is actually a bigger "feature".

Actions #4

Updated by Bhanu Prasad Ganguru about 7 years ago

Is there a timeline for this feature??

Actions

Also available in: Atom PDF