Skip to content

Handle dual-stack configuration in inspection data#758

Merged
metal3-io-bot merged 2 commits intometal3-io:masterfrom
hardys:dualstack_fix
Jan 6, 2021
Merged

Handle dual-stack configuration in inspection data#758
metal3-io-bot merged 2 commits intometal3-io:masterfrom
hardys:dualstack_fix

Conversation

@hardys
Copy link
Copy Markdown
Member

@hardys hardys commented Jan 5, 2021

Currently we assume only an ipv4 or an ipv6 IP exists in the
inspection data, but it's valid for both to exist in a dual-stack
scenario.

To avoid changing the BMH API, in this case we create an additional
nic entry in the list, which will contain each IP but otherwise
the same data.

Fixes: #458

@metal3-io-bot metal3-io-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 5, 2021
@hardys hardys requested review from dhellmann, russellb and zaneb January 5, 2021 15:33
@stbenjam
Copy link
Copy Markdown
Member

stbenjam commented Jan 5, 2021

/test-integration

@hardys
Copy link
Copy Markdown
Member Author

hardys commented Jan 5, 2021

Tested in a dual-stack environment and this does work as expected:

    hostname: worker-0
    nics:
    - ip: 192.168.111.23
      mac: 00:8a:dc:db:c7:f1
      model: 0x1af4 0x0001
      name: enp2s0
      pxe: false
      speedGbps: 0
      vlanId: 0
    - ip: fd2e:6f44:5dd8:c956::1f
      mac: 00:8a:dc:db:c7:f1
      model: 0x1af4 0x0001
      name: enp2s0
      pxe: false
      speedGbps: 0
      vlanId: 0

@hardys
Copy link
Copy Markdown
Member Author

hardys commented Jan 5, 2021

/test-integration

@dhellmann
Copy link
Copy Markdown
Member

This version looks good.

/approve

Currently we assume only an ipv4 *or* an ipv6 IP exists in the
inspection data, but it's valid for both to exist in a dual-stack
scenario.

To avoid changing the BMH API, in this case we create an additional
nic entry in the list, which will contain each IP but otherwise
the same data.

Fixes: metal3-io#458
@hardys
Copy link
Copy Markdown
Member Author

hardys commented Jan 5, 2021

This version looks good.

Thanks - I just pushed a minor update to the test (I forgot to compare the value for the NoIp nic added in the previous revision)

Copy link
Copy Markdown
Member

@bfournie bfournie left a comment

Choose a reason for hiding this comment

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

Do you think description here needs to change to indicate a 2nd nic will be used for dual-stack? https://github.com/metal3-io/baremetal-operator/blob/master/config/crd/bases/metal3.io_baremetalhosts.yaml#L343

@hardys
Copy link
Copy Markdown
Member Author

hardys commented Jan 6, 2021

Do you think description here needs to change to indicate a 2nd nic will be used for dual-stack? https://github.com/metal3-io/baremetal-operator/blob/master/config/crd/bases/metal3.io_baremetalhosts.yaml#L343

Good point, thanks! I'll push another commit which clarifies that.

@hardys
Copy link
Copy Markdown
Member Author

hardys commented Jan 6, 2021

/test-integration

@metal3-io-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bfournie, dhellmann, hardys

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

@stbenjam
Copy link
Copy Markdown
Member

stbenjam commented Jan 6, 2021

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 6, 2021
@metal3-io-bot metal3-io-bot merged commit b9b8cba into metal3-io:master Jan 6, 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/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle dual-stack configuration for NIC IP

5 participants