fix: iPXE boot interface neutron logic detection#1512
Merged
Conversation
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.
b9ca2d2 to
94ecb21
Compare
cardoe
approved these changes
Dec 15, 2025
Contributor
cardoe
left a comment
There was a problem hiding this comment.
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.
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.
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.