Bug #14905

DHCP reservation for PXE boot not added when using static boot mode

Added by Jan-Otto Kröpke over 1 year ago. Updated over 1 year ago.

Status:Closed
Priority:High
Assigned To:Dominic Cleal
Category:DHCP
Target version:-
Difficulty: Bugzilla link:1340167
Found in release: Pull request:https://github.com/theforeman/foreman/pull/3552
Story points-
Velocity based estimate-
Release1.11.3Release relationshipAuto

Description

Hi,

we have one central tftp server and multiple dhcp servers to avoid the dhcp relay via firewalls.

Since foreman 1.11, we can not deploy vm, because foreman will not add the dhcp leases on the external dhcp servers. PXE will not work anymore.

tcpdump also wont show any connections..

If I add a tftp role to a dhcp server and attach it to one subnet, the leases will be added to this dhcp server doing the host creation and everything will be work as expected.

I can not find any errory on /var/log/foreman-proxy/proxy.log or /var/log/foreman/production.log .

Best Regards,
Jan-Otto Kröpke
noris network AG

Bildschirmfoto 2016-05-02 um 19.00.51.png (33 KB) Preview Jan-Otto Kröpke, 05/02/2016 01:01 PM

Bildschirmfoto 2016-05-02 um 19.02.05.png (25.9 KB) Preview Jan-Otto Kröpke, 05/02/2016 01:02 PM

Bildschirmfoto%202016-05-02%20um%2019.00.51 Bildschirmfoto%202016-05-02%20um%2019.02.05

Related issues

Related to Foreman - Bug #14113: DHCP orchestration ignored subnet bootmode Closed 03/09/2016
Related to Foreman - Support #14792: foreman not sending the POST to the DHCP smart proxy Resolved 04/24/2016

Associated revisions

Revision db140f2a
Added by Dominic Cleal over 1 year ago

fixes #14905 - enable DHCP orchestration with any boot mode

DHCP orchestration remains useful to set up PXE booting to start the
provisioning process, even when a static boot mode because the boot mode
is typically applied later through templates. It's also useful in image
provisioning to bring the host onto the network.

To disable DHCP orchestration, the DHCP Proxy should be unset instead
of changing the boot mode.

Reverts commit 85c6f53.

History

#1 Updated by Jan-Otto Kröpke over 1 year ago

I have attached two screenshot

One from installing a machine.

An another screenshot from the subnet setting.

As you can see, the step "configure dhcp" is missing on the first screen.

Looks like foreman ignore the settings from the subnet.

Unset and set the settings again does not work correctly.

We are upgrade to foreman 1.11 and then to 1.11.1. Maybe there are some migrations issues.

#2 Updated by Dominic Cleal over 1 year ago

  • Project changed from Smart Proxy to Foreman
  • Category changed from DHCP to DHCP
  • Status changed from New to Need more information

What is the Boot mode set to in the Subnet settings? Ensure it's on DHCP, not Static.

#3 Updated by Jan-Otto Kröpke over 1 year ago

It is Static and it work since 1.6 without any problems.

The subnet which has the foreman as TFTP and DHCP proxy itself,

If Static is a problem, how to deploy PXE machines?

#4 Updated by Dominic Cleal over 1 year ago

  • Related to Bug #14113: DHCP orchestration ignored subnet bootmode added

#5 Updated by Dominic Cleal over 1 year ago

  • Status changed from Need more information to Feedback

It is Static and it work since 1.6 without any problems.

The linked bug changes behaviour to only create DHCP reservations when DHCP boot mode is in use. You should consider changing the boot mode to DHCP, which should fix PXE booting.

#6 Updated by Jan-Otto Kröpke over 1 year ago

Its does not make sense.

PXE should work even with Static Boot mode. In my opinion, provision and boot mode are two different things.

Using DHCP as boot mode is fatal, because if the foreman is unavailable, all maschine will drop the ip after the lease time..

The Foreman will mutate to a single point of failure.

#7 Updated by Dominic Cleal over 1 year ago

  • Subject changed from Foreman does not add dhcp.leases for new vm, if dhcp and tftp proxy is different to DHCP reservation for PXE boot not added when using static boot mode
  • Status changed from Feedback to New

PXE should work even with Static Boot mode. In my opinion, provision and boot mode are two different things.

Yes, I'll leave this bug open for that reason.

Using DHCP as boot mode is fatal, because if the foreman is unavailable, all maschine will drop the ip after the lease time..

As an aside, DHCP is provided by your DHCP server and not Foreman, so could well be set up in a failover or other HA configuration.

#8 Updated by Jan-Otto Kröpke over 1 year ago

Thanks.

Maybe a configable option would be the best.

#9 Updated by Daniel Gagnon over 1 year ago

I confirm hitting the same issue.

In our setup, we are using DHCP for provisionning, but static IP addressing for the servers once they are online.

We still want the lease to be created to support the provisionning process as well as recovery environnements.

#10 Updated by Dominic Cleal over 1 year ago

  • Release set to 1.11.2

#11 Updated by Dominic Cleal over 1 year ago

  • Release changed from 1.11.2 to 1.11.3

#12 Updated by Baptiste Agasse over 1 year ago

I confirm too, we use dhcp server only in "static" mode. The dhcp server is only used for provisioning purposes (DHCP/PXE/TFTP) and keep track of already assigned IPs on our subnets with dhcp reservations.

#13 Updated by Dominic Cleal over 1 year ago

  • Related to Support #14792: foreman not sending the POST to the DHCP smart proxy added

#14 Updated by The Foreman Bot over 1 year ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Dominic Cleal
  • Pull request https://github.com/theforeman/foreman/pull/3552 added

#15 Updated by Frank Grötzner over 1 year ago

As workaround I edited the snippet "kickstart_networking_setup" and added
<% dhcp = false >
below
<
dhcp = subnet.dhcp_boot_mode? -%>
in line 113.

#16 Updated by Dominic Cleal over 1 year ago

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

#17 Updated by Marek Hulán over 1 year ago

  • Bugzilla link set to 1340167

Also available in: Atom PDF