Skip to content

fix: iPXE boot interface neutron logic detection#1512

Merged
cardoe merged 1 commit into
mainfrom
ironic_ipxe_neutron_patch
Dec 15, 2025
Merged

fix: iPXE boot interface neutron logic detection#1512
cardoe merged 1 commit into
mainfrom
ironic_ipxe_neutron_patch

Conversation

@mfencik
Copy link
Copy Markdown
Contributor

@mfencik mfencik commented Dec 15, 2025

This patch fixes below described logic which caused undersync to not sync properly due to leftover neutron ports created by ironic.

The neutron network interface's add_ports_to_network() function only checked for 'pxe_boot' capability when determining PXE capability, but iPXE is also a form of PXE booting and should be treated the same way. This caused inconsistent behavior for boot interfaces like 'http-ipxe' that have 'ipxe_boot' capability but not 'pxe_boot' capability.

Without this fix, iPXE boot interfaces were incorrectly treated as non-PXE capable, causing the neutron interface to create ports for all baremetal ports with local_link_connection info during cleaning operations, regardless of their pxe_enabled setting.

This change updates the pxe_capability detection logic to include 'ipxe_boot' capability alongside 'pxe_boot', ensuring that iPXE boot interfaces are correctly recognized as PXE-capable.

As a secondary benefit, this also fixes an inconsistency where the port deletion logic in remove_ports_from_network() was not using the same pxe_capability logic as port creation, which did lead to orphaned neutron ports after cleaning operations.

This has been tested in dev environment and it works.

The neutron network interface's add_ports_to_network() function only
checked for 'pxe_boot' capability when determining PXE capability,
but iPXE is also a form of PXE booting and should be treated the
same way. This caused inconsistent behavior for boot interfaces like
'http-ipxe' that have 'ipxe_boot' capability but not 'pxe_boot'
capability.

Without this fix, iPXE boot interfaces were incorrectly treated as
non-PXE capable, causing the neutron interface to create ports for
all baremetal ports with local_link_connection info during cleaning
operations, regardless of their pxe_enabled setting.

This change updates the pxe_capability detection logic to include
'ipxe_boot' capability alongside 'pxe_boot', ensuring that iPXE
boot interfaces are correctly recognized as PXE-capable.

As a secondary benefit, this also fixes an inconsistency where the
port deletion logic in remove_ports_from_network() was not using
the same pxe_capability logic as port creation, which did lead
to orphaned neutron ports after cleaning operations.
@mfencik mfencik force-pushed the ironic_ipxe_neutron_patch branch 2 times, most recently from b9ca2d2 to 94ecb21 Compare December 15, 2025 20:02
@mfencik mfencik marked this pull request as ready for review December 15, 2025 20:04
Copy link
Copy Markdown
Contributor

@cardoe cardoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can merge this and you can submit this upstream like this but I'll say I think the best approach would be to add:

def is_capable(self, cap) -> bool:
    pass

on the BootInterface. The reality its that in the code base ipxe_boot implies pxe_boot.

@cardoe cardoe added this pull request to the merge queue Dec 15, 2025
Merged via the queue into main with commit 778cd47 Dec 15, 2025
90 checks passed
@cardoe cardoe deleted the ironic_ipxe_neutron_patch branch December 15, 2025 23:08
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