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
baremetal: validate that macs are EUI-48 and unicast #4378
baremetal: validate that macs are EUI-48 and unicast #4378
Conversation
/label platform/baremetal |
c7b8546
to
1cb0cbf
Compare
4508acf
to
83d26b7
Compare
/retitle baremetal: validate that macs are EUI-48 and unicast |
83d26b7
to
1d91dff
Compare
When users specify a custom MAC address for the provisioning and baremetal bridges of the libvirt bootstrap host, libvirt complains if the user does not give a unicast MAC address: ``` 020-11-13 10:52:18 level=debug msg=2020/11/13 10:52:18 [ERROR] module.bootstrap: eval: *terraform.EvalApplyPost, err: Error defining libvirt domain: virError(Code=27, Domain=20, Message='XML error: expected unicast mac address, found multicast '7D:CE:E3:29:35:6F'') ') ``` This adds a function that validates whether a MAC address is unicast. A multicast MAC address is one where the most significant byte has a least significant bit of `1`. Example 1: Multicast MAC ------------------------ 7D:CE:E3:29:35:6F ^--> most significant byte 0x7D is 0b11111101 ^--> this is a multicast MAC Example 2: Unicast MAC ---------------------- 7A:CE:E3:29:35:6F ^--> most significant byte 0x7A is 0b11111010 ^--> this is a unicast MAC Additionally, the built-in ParseMAC in go net accepts EUI-64 and Infiniband macs. This updates our validator to make sure we have EUI-48 (6-octet) MAC address as well.
1d91dff
to
659db16
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dhellmann, staebler The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
6 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
12 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/skip e2e-aws-upgrade |
/skip |
/test e2e-aws-upgrade |
/retest Please review the full test history for this PR and help us cut down flakes. |
5 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/test e2e-aws |
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@stbenjam: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest Please review the full test history for this PR and help us cut down flakes. |
When users specify a custom MAC address for the provisioning and
baremetal bridges of the libvirt bootstrap host, libvirt complains
if the user does not give a unicast MAC address:
020-11-13 10:52:18 level=debug msg=2020/11/13 10:52:18 [ERROR] module.bootstrap: eval: *terraform.EvalApplyPost, err: Error defining libvirt domain: virError(Code=27, Domain=20, Message='XML error: expected unicast mac address, found multicast '7D:CE:E3:29:35:6F'') ')
This adds a function that validates whether a MAC address is unicast. A
multicast MAC address is one where the most significant byte has a least
significant bit of
1
.Additionally, the built-in ParseMAC in go net accepts EUI-64 and
Infiniband macs. This updates our validator to make sure we have
EUI-48 (6-octet) MAC address as well.