-
Notifications
You must be signed in to change notification settings - Fork 296
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
Set network interface name with cloud-init set-name #707
Set network interface name with cloud-init set-name #707
Conversation
Hi @MnrGreg. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/assign @frapposelli |
/ok-to-test |
Hi @MnrGreg, Thank you very much for this PR! Here's my suggestion:
Currently e2e is broken on |
Signed-off-by: Greg May <[email protected]>
ed55708
to
72c11dd
Compare
/retest |
/test pull-cluster-api-provider-vsphere-verify-shell |
@akutz could you review when you have a moment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MnrGreg,
This looks great. I had one small nit about the casing of a comment. Finally, I'm sorry for this, but I'm wondering if the property shouldn't be DeviceName
? For example:
// DeviceName may be used to explicitly assign a name to the network device
// as it exists in the guest operating system.
// +optional
DeviceName string `json:"deviceName,omitempty"`
Obviously the generated cloud-init metadata would still use set-name
(since that is the name of the field from cloud-init's point-of-view), but I'm thinking that SetName
makes far less sense in the NetworkDeviceSpec
than something like DeviceName
. What do you think?
api/v1alpha2/types.go
Outdated
// setName can be used to give the device a more specific/desirable/nicer | ||
// name than the default from udev’s ifnames | ||
// +optional | ||
SetName string `json:"setName,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MnrGreg,
The GoDoc comment should reflect the name/casing of the field, not the JSON property. So the comment should be:
// SetName can...
And if I might recommend?
// SetName may be used to explicitly assign a name to the network device
// as it exists in the guest operating system.
Hi @MnrGreg, I'm placing a hold on this until you have a chance to respond to the suggestion re: /hold |
Signed-off-by: Greg May <[email protected]>
Signed-off-by: Greg May <[email protected]>
Signed-off-by: Greg May <[email protected]>
/hold cancel Looks good to me. Please ping me when it passes the CRD check, and I’ll lgtm it. I’d do so now, but it will just get removed when you rebase. Also, I will cherry pick this (or you can) over to Master once this merges. |
/lgtm Thank you again! Once this merges I or you can cherry pick this to master. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akutz, MnrGreg 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 |
The pointers were not working as expected so the API is changing to be more functional and leverage kubernetes' DeepCopy function.
/kind bug
/assign @akutz
What this PR does / why we need it:
Cloud-Init Network Config Version 2
fails to usePredictable Network Interface Names
. Instead it uses theCloud-Init Device Configuration ID
as the interface name. Bug #1855945As a workaround, this PR adds
SetName
as an optional parameter to theNetworkDeviceSpec
. WhenSetName
is not specified,cloud-init metadata
is configured withset-name: "eth*"
where * equals the Device ID index. WhenSetName
is specified,cloud-init set-name
uses this value.Summary:
SetName
toNetworkDeviceSpec
SetName
tovspheremachines
andvspheremachinetemplates
CRDsset-name
topkg/util/constants.go
machines_tests.go
troubleshooting.md
documentationWhich issue(s) this PR fixes
Fixes #583
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: