Feature #1459
closed
Added by Anonymous almost 13 years ago.
Updated over 6 years ago.
Category:
Unattended installations
|
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.
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.
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.
- 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.
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.
- Status changed from Feedback to New
- Assignee deleted (
Ohad Levy)
- 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.
- Assignee set to Timo Goebel
- Pull request https://github.com/theforeman/foreman/pull/5988 added
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".
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/6009 added
- Related to Feature #24871: serve intermediate iPXE script to report MAC address to Foreman added
- Fixed in Releases 1.20.0 added
- Status changed from Ready For Testing to Closed
Also available in: Atom
PDF