Project

General

Profile

Feature #1459

iPXE support

Added by Alexandru S. almost 7 years ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Unattended installations
Target version:
-
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Hello everyone,

I'm using iPXE to boot my servers right now and I didn't find other way to actually get the i/gPXE template with static IP from foreman without having to actually use a php script to load http://foreman/unattended/gPXE which adds the X-RHN-Provisioning-MAC-0 http header allowing the machine the access to my i/gPXE template.
This way my template sends the machine based on MAC the exact ip address configured in foreman that CentOS should kickstart from, as I'm not using DHCP for my local network.

It would worth supporting a GET request that would allow sending the mac address to /unattended/gPXE and a default response (i.e blank page) when the machine is already built in foreman instead of the http 40x errors, this way you could for eg. chainload iPXE everytime the machine boots without having to worry about it or use other pages to determine foreman's response.

Regards.


Related issues

Related to Foreman - Feature #24871: serve intermediate iPXE script to report MAC address to ForemanClosed

Associated revisions

Revision c521c6e5 (diff)
Added by Timo Goebel 3 months ago

fixes #1459 - ipxe provisioning support

History

#1 Updated by Ohad Levy almost 7 years ago

one thing I'm not sure I understand, why does it does it use the correct ip address upfront? (e.g. did you configure dhcp) or is that the case where dhcp is not used and you get a random ip address?

using the correct ip address, foreman would match the provisioning data.

#2 Updated by Alexandru S. almost 7 years ago

Sorry for not mentioning that, DHCP is configured to assign ip addresses only to PXE booting machines and the smart proxy is not touching it (if that's what you mean by not used), anything else on the network needs static ip address.

#3 Updated by Ohad Levy almost 7 years ago

  • Status changed from New to Feedback

Alexandru S. wrote:

Sorry for not mentioning that, DHCP is configured to assign ip addresses only to PXE booting machines and the smart proxy is not touching it (if that's what you mean by not used), anything else on the network needs static ip address.

the recommended approach would be to let foreman create a dhcp reservation, where the host would use that for initial boot, and later on during kickstart / puppet change it to static ip address.

if you use that way, your i/gpxe provisioning should work as expected.

#4 Updated by Alexandru S. almost 7 years ago

I don't see this as a viable option for our current setup, which includes more than 700 machines with static ip address and nfs root configured through DHCP that won't be moved to puppet/foreman yet as first of all we want to make sure that the workstations transition is done right.

Anyway, I will stick with the php script in front of iPXE, as the setup does not require another reservation which I would have to make a request for (Company's rules), for now and hopefully this will be supported in the future.

#5 Updated by Benjamin Papillon over 5 years ago

  • Status changed from Feedback to New
  • Assignee deleted (Ohad Levy)

#6 Updated by Dominic Cleal about 5 years ago

  • Description updated (diff)

I extended this via the foreman_bootdisk plugin to do roughly what you're asking - the URL then takes an additional mac parameter so you don't need the anaconda header.

The 40x error is another problem I've seen, but haven't fixed yet. We could do with the equivalent of the PXELinux "localboot" template for gPXE - or a pre-programmed blank response as you say.

#7 Updated by The Foreman Bot 4 months ago

  • Assignee set to Timo Goebel
  • Pull request https://github.com/theforeman/foreman/pull/5988 added

#8 Updated by Lukas Zapletal 4 months ago

Just for the record, the PR associated to this ticket is more of a generic and improved iPXE support in Foreman while the ticket requests support sending MAC address in unattended iPXE call. This was available for years if you had foreman bootdisk plugin enabled, in Foreman 1.17+ this code moved into core so it's possible to do this without bootdisk plugin. The parameter to send is called just "mac".

#9 Updated by The Foreman Bot 4 months ago

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

#10 Updated by Timo Goebel 3 months ago

  • Related to Feature #24871: serve intermediate iPXE script to report MAC address to Foreman added

#11 Updated by Michael Moll 3 months ago

  • Fixed in Releases 1.20.0 added

#12 Updated by Timo Goebel 3 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF