fix: inject BOOTIF kernel param from requesting MAC at bootscript serve time#78
Open
j0hnL wants to merge 1 commit into
Open
fix: inject BOOTIF kernel param from requesting MAC at bootscript serve time#78j0hnL wants to merge 1 commit into
j0hnL wants to merge 1 commit into
Conversation
…ve time When a node fetches its bootscript via GET /boot/v1/bootscript?mac=<mac>, BSS already has the requesting MAC available. On multi-NIC servers, dracut sends DHCP on all interfaces without BOOTIF, causing it to configure the wrong NIC. This change injects BOOTIF=01-<mac> dynamically using the same checkParam() mechanism already used for xname=, nid=, and ds=. checkParam() skips injection if BOOTIF already exists in stored params, so operators who set it explicitly retain control. Nodes fetching by ?name= or ?nid= without a MAC get no BOOTIF injection (mac is empty string, guard prevents injection). Fixes: multi-NIC PXE boot failures where cloud-init configures the wrong network interface. Signed-off-by: John Lockman <j.lockman@dell.com>
sujit-jadhav
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make test(or equivalent) locally and all tests passgit commit -s) with my real name and email<filename>.licensesidecarLICENSES/directoryDescription
On multi-NIC servers booted via BSS, dracut receives
ip=dhcpwith noBOOTIFparameter. It sends DHCP on all interfaces and configures whichever responds first, which may not be the PXE boot NIC. This breaks cloud-init (wrong IP) and network configuration at boot time. BSS currently leaves it to admins to hardcode BOOTIF at the boot layer in stored params, which is error-prone and difficult to do generically for a group.Fix
buildParams()already injectsxname=,nid=, andds=dynamically at serve time usingcheckParam(). This PR adds BOOTIF to that list.The requesting MAC is available in
BootscriptGet()from?mac=<mac>. It's threaded intoscriptParamsand injected asBOOTIF=01-<mac>inbuildParams().Behavior
checkParam()skipsinjection, no duplicate, no override
?name=or?nid=without MAC: no injection (safe guard)How to use this:
Fixes #(issue) did not open issue.
Type of Change
For more info, see Contributing Guidelines.