Skip to content

Ask Ironic to include NodeUUID when querying ports#776

Merged
metal3-io-bot merged 1 commit intometal3-io:masterfrom
honza:port-details
Jan 26, 2021
Merged

Ask Ironic to include NodeUUID when querying ports#776
metal3-io-bot merged 1 commit intometal3-io:masterfrom
honza:port-details

Conversation

@honza
Copy link
Member

@honza honza commented Jan 22, 2021

When registering a new host, we check if its bootMACAddress conflicts
with any existing Ironic nodes. This procedure queries Ironic ports,
and if a port is found, we use the port's NodeUUID to find the
conflicting node. However, we are using ports.List() which only
returns minimal resources by default; e.g. any returned ports will have
their NodeUUID property set to an empty string.

We are now explicitly asking for Ironic to include the node_uuid
field.

We also adjust the mock test mechanism to account for this.

@metal3-io-bot metal3-io-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 22, 2021
@stbenjam
Copy link
Member

Seems reasonable to me

/approve

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 22, 2021
@stbenjam
Copy link
Member

/test-integration

Copy link
Member

@zaneb zaneb left a comment

Choose a reason for hiding this comment

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

/approve

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dtantsur, honza, stbenjam, zaneb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

When registering a new host, we check if its bootMACAddress conflicts
with any existing Ironic nodes.  This procedure queries Ironic ports,
and if a port is found, we use the port's NodeUUID to find the
conflicting node.  However, we are using `ports.List()` which only
returns minimal resources by default; e.g. any returned ports will have
their NodeUUID property set to an empty string.

We are now explicitly asking for Ironic to include the `node_uuid`
field.

We also adjust the mock test mechanism to account for this.
@honza honza changed the title Ask Ironic to include details when querying ports Ask Ironic to include NodeUUID when querying ports Jan 26, 2021
@zaneb
Copy link
Member

zaneb commented Jan 26, 2021

/test-integration
/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 26, 2021
@metal3-io-bot metal3-io-bot merged commit 1ccc746 into metal3-io:master Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants