Project

General

Profile

Actions

Bug #18053

closed

IPXE Chainloading overridden by Foreman.

Added by Jason Lang over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
DHCP
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hello All,

I've encountered an issue attempting to use Foreman 1.13.3 to Chainload pxelinux to iPXE using the undionly.kpxe file.

This is on Foreman 1.13.3 using RHEL 7.2. This means i am using RHEL 7.2's default dhcp (dhcpd-isc?) DHCP provider. I have followed the step(s) here: http://projects.theforeman.org/projects/foreman/wiki/Fetch_boot_files_via_http_instead_of_TFTP

So I pxe boot to pxelinux.0 successfully, and load undionly.kpxe successfully. Whereby I DHCP to foreman again and "should" be presented to connect to my Foreman unattend/IPXE file as the below logic is in my dhcpd.conf file (and I've restarted dhcpd and cleared my leases and regenerated by re-enabling "build" on the host.

  1. PXE/iPXE Handoff.
  2. The if statement below prevents infinite booting when using undionly.kpxe files
  3. Normal PXE boots are unaffected
    next-server <%= @ipaddress_eth0 %>;
    if exists user-class and option user-class = "iPXE" {
    filename "https://obfuscatedURL:443/unattended/iPXE";
    } else {
    filename "pxelinux.0";
    }

This is not what happens, and i am boot looping infinitely.

I "think" the issue comes down to how foreman is creating a lease. Looking at a sample lease for the host in question from dhcpd.leases
Note: FQDN, next-server, and IP changed for privacy

host myhostname.labdomain.com {
dynamic;
hardware ethernet 00:50:56:95:5c:88;
fixed-address 172.111.111.112;
supersede server.filename = "pxelinux.0";
supersede server.next-server = aa:ab:cd:0e;
supersede host-name = "myhostname.labdomain.com";
}

I think the issue lies with the supersede server.filename line. As this will (i believe) override the logic present in the dhcpd.conf file.

Im unsure if this is a bug, or desired behavior, perhaps something with the specific configuration, or a missing line in a .yml file somewhere. I googled around for a bit and found few references to this. Has anyone else had this issue, or knows of a fix? Is this expected behavior in foreman? I feel like it isn't - and the dhcpd.conf should be driving the bootfile name per the Guide: http://projects.theforeman.org/projects/foreman/wiki/Fetch_boot_files_via_http_instead_of_TFTP but i definitely could be wrong.

I can provide additional info if needed - just let me know.!

Actions #1

Updated by Dominic Cleal over 7 years ago

  • Status changed from New to Feedback

Set the "None" PXE/boot loader under the "Operating system" tab when creating the host instead of the default PXELinux boot loader. This should prevent a filename being set.

(#12434, #12634)

Actions #2

Updated by Jason Lang over 7 years ago

Dominic Cleal wrote:

Set the "None" PXE/boot loader under the "Operating system" tab when creating the host instead of the default PXELinux boot loader. This should prevent a filename being set.

(#12434, #12634)

Sorry for the delayed response - this was the issue, Thanks for the help/insight!

Actions #3

Updated by Jason Lang over 7 years ago

  • Status changed from Feedback to Rejected
Actions

Also available in: Atom PDF