Skip to content

Conversation

@stevekeay
Copy link
Contributor

@stevekeay stevekeay commented Oct 17, 2025

Understack operation requires that every baremetal node has baremetal ports for each NIC we want to use.

Upstream ironic includes inspection hooks which can create baremetal ports and set local_link_info based on LLDP information, but UnderStack requires that Baremetal ports have specific attributes populated:

  1. Exactly ONE of the ports on a node have set the pxe flag set. We put this port into the provisioning/cleaning network to boot the IPA image. (Putting multiple ports into the provisioning/cleaning VLAN causes DHCP and ARP issues, so we nominate a single port to boot from. This should be the same port that the actual server will attempt to use to make PXE requests).
  2. local_link field must be populated with upstream connected switch HOSTNAME and INTERFACE name. We use these to drive switch automation.
  3. physical_network field must be populated with the appropriate VLAN Group name. We use this to drive VLAN number assignment and switch configuration.

In addition, the baremetal node should have traits indicating the networks (VLAN Groups) to which it is connected, for example if it has NICs connected to the STORAGE switch then we would add the CUSTOM_STORAGE_SWITCH trait.

Switch uplink connections for the node are identified during node inspection using LLDP. The "agent" inspector does this today, and we are enhancing the out-of-band inspection to provide the same data (where the hardware permits).

This inspection hook is understack-specific in that it assumes our switch hostnames will follow a certain naming convention, however the details of that convention are supplied as configuration.

We previously performed these activities as part of the "enrol" process, but performing these activities inside Ironic gives operators more visibility and allows them to drive remediation or updates via the openstack API. For example, if a physical node had cabling issues during enrol, these can be resolved and the node can be "inspected" to straighten out the baremetal ports without needing to trigger an external workflow or process.

Once this PR is done, we can remove those steps from the enrol process - see #1416

PREREQUISITES

Today when a node undergoes cleaning, provisioning or agent inspection, all but one of its ports are shut down. This defeats LLDP and prevents the inspection from seeing the link on the other ports. We need to change our network design/template so that during inspection all ports are UP (and talk LLDP) but don't have any other traffic. This includes ports already documented in ironic (being re-inspected) as well as ports that are currently unknown (ports being discovered and created in ironic for the first time).

NOTE that when these baremetal port updates occur, ironic emits events which should trigger a workflow to make corresponding changes in nautobot)

@stevekeay stevekeay force-pushed the ironic-inspection-hook branch from 9ff91f9 to 21d33c6 Compare October 17, 2025 14:59
@cardoe cardoe changed the title Add update_baremetal_port ironic inspection hook feat(ironic): Add update_baremetal_port ironic inspection hook Oct 20, 2025
@stevekeay stevekeay force-pushed the ironic-inspection-hook branch 3 times, most recently from 30e1717 to 6038946 Compare October 21, 2025 09:41
@stevekeay stevekeay force-pushed the ironic-inspection-hook branch 5 times, most recently from 9949abc to 3b3481f Compare November 4, 2025 12:58
@stevekeay stevekeay force-pushed the ironic-inspection-hook branch 3 times, most recently from 1d0d819 to 68ce0f1 Compare November 24, 2025 12:52
@stevekeay stevekeay force-pushed the ironic-inspection-hook branch 10 times, most recently from e73b8ab to eff13b7 Compare November 26, 2025 12:18
@stevekeay stevekeay force-pushed the ironic-inspection-hook branch from eff13b7 to e94c6eb Compare November 26, 2025 12:18
The redfish inspection populates the node inventory with these names.
Save them as a port attribute because they are useful for describing the
location of the physical network ports in the rack.

We use the "extra" field because Ironic insists that the "name" field is
globally unique.
@stevekeay stevekeay force-pushed the ironic-inspection-hook branch from e94c6eb to 705e0cc Compare November 26, 2025 12:30
@stevekeay stevekeay force-pushed the ironic-inspection-hook branch from 37ba4de to 3ae47bd Compare November 26, 2025 12:36
@stevekeay stevekeay force-pushed the ironic-inspection-hook branch from 127b96e to 9006136 Compare November 26, 2025 14:01
@stevekeay stevekeay force-pushed the ironic-inspection-hook branch from 9006136 to 3ade42b Compare November 26, 2025 14:57
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