Skip to content

fix: get pxe_enabled from BIOS setting instead of naming heuristic#1857

Merged
stevekeay merged 1 commit intomainfrom
inspect-honour-bios-pxe-port
Mar 24, 2026
Merged

fix: get pxe_enabled from BIOS setting instead of naming heuristic#1857
stevekeay merged 1 commit intomainfrom
inspect-honour-bios-pxe-port

Conversation

@stevekeay
Copy link
Contributor

@stevekeay stevekeay commented Mar 23, 2026

As part of the enrolment process we populate the BIOS setting for which NIC to use for PXE boot (HttpDev1Interface). This is likely to be the correct interface, so stop using the naming-convention heuristic in PortBiosNameHook to choose the PXE port and instead honour the setting that we pull from the BIOS.

Add a new BiosPxePortHook inspection hook that uses Ironic's built-in bios interface (task.driver.bios.cache_bios_settings) to populate the BIOS settings DB, then reads HttpDev1Interface via BIOSSetting.get() to determine which NIC to mark as the PXE port. The prefix-matching logic handles the case where the BIOS FQDD is more specific than the EthernetInterface identity (e.g. NIC.Integrated.1-1-1 vs NIC.Integrated.1-1).

PortBiosNameHook retains responsibility for setting the port name, extra.bios_name, physical_network and local_link_connection but no longer touches the pxe flag.

Closes #1842
No pre-requisites
Tested in dev by invoking redfish inspection:

2026-03-23 15:50:55.552info13 INFO ironic_understack.port_bios_name_hook [None req-0b77328e-d154-4400-8252-fe3ea15bc5ec - - - - - -] Port B4:83:51:24:5B:D3 (NIC.Slot.1-2-1) pxe_enabled True -> False

2026-03-23 15:50:55.536info13 INFO ironic_understack.port_bios_name_hook [None req-0b77328e-d154-4400-8252-fe3ea15bc5ec - - - - - -] Node 8125bd38-2df1-458f-8763-21656ea30b28 BIOS HttpDev1Interface = NIC.Integrated.1-1-1

@stevekeay stevekeay changed the title Set pxe_enabled from BIOS setting instead of naming heuristic fix: get pxe_enabled from BIOS setting instead of naming heuristic Mar 23, 2026
@stevekeay stevekeay force-pushed the inspect-honour-bios-pxe-port branch 2 times, most recently from 7c90a9f to c985b6f Compare March 23, 2026 15:23
@stevekeay stevekeay marked this pull request as draft March 23, 2026 15:27
@stevekeay stevekeay force-pushed the inspect-honour-bios-pxe-port branch 3 times, most recently from 9bf139f to 96981fd Compare March 23, 2026 15:57
As part of the enrolment process we populate the BIOS setting for which
NIC to use for PXE boot (HttpDev1Interface).  This is likely to be the
correct interface, so stop using the naming-convention heuristic in
PortBiosNameHook to choose the PXE port and instead honour the setting
that we pull from the BIOS.

This now uses Ironic's built-in bios interface
(task.driver.bios.cache_bios_settings) to populate the BIOS settings DB,
then reads HttpDev1Interface via BIOSSetting.get() to determine which
NIC to mark as the PXE port.  The prefix-matching logic handles the case
where the BIOS FQDD is more specific than the EthernetInterface
identity (e.g. NIC.Integrated.1-1-1 vs NIC.Integrated.1-1).
@stevekeay stevekeay force-pushed the inspect-honour-bios-pxe-port branch from 96981fd to ab7bf21 Compare March 23, 2026 16:09
@stevekeay stevekeay marked this pull request as ready for review March 23, 2026 16:09
@stevekeay stevekeay requested review from RSabounds and andrrax March 24, 2026 10:38
@andrrax
Copy link
Contributor

andrrax commented Mar 24, 2026

Much better approach than what we have currently.

@stevekeay stevekeay added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit 3a60c95 Mar 24, 2026
63 checks passed
@stevekeay stevekeay deleted the inspect-honour-bios-pxe-port branch March 24, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants