-
Notifications
You must be signed in to change notification settings - Fork 7
feat(ironic): Add update_baremetal_port ironic inspection hook #1347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
stevekeay
wants to merge
14
commits into
main
Choose a base branch
from
ironic-inspection-hook
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
9ff91f9 to
21d33c6
Compare
30e1717 to
6038946
Compare
dddc1ce to
f2a56c6
Compare
f2a56c6 to
cd8d5ab
Compare
4d9d196 to
9949abc
Compare
9949abc to
3b3481f
Compare
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.
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:
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
STORAGEswitch then we would add theCUSTOM_STORAGE_SWITCHtrait.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.
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)