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
vsphere: set providerID #459
Conversation
/test unit |
s.machine.Status.ProviderStatus = providerStatus | ||
if err := s.client.Status().Patch(context.Background(), s.machine, s.machineToBePatched); err != nil { | ||
klog.Errorf("Failed to update machine %q: %v", s.machine.GetName(), err) | ||
if err := s.client.Status().Patch(context.Background(), s.machine.DeepCopy(), s.machineToBePatched); err != nil { |
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.
Not sure I understand the design of the machineScope. Why do we deep copy the machine here? That means we discard the results of the update, and now both the machine
and machineToBePatched
fields are out of date.
pkg/controller/vsphere/reconciler.go
Outdated
// If the supplied UUID is empty or invalid an error is returned. | ||
// A valid UUID should adhere to the format specified by UUIDPattern. | ||
func convertUUIDToProviderID(UUID string) (string, error) { | ||
pattern := regexp.MustCompile(UUIDPattern) |
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.
I don't really have an objection to this, but we could also just uuid.Parse()
the UUID and then parsedUUID.String()
to make sure its in a known format for the provider ID. Might be a little more forgiving, and does away with the big regex.
9b3025c
to
ca9022d
Compare
/hold cancel |
/retest |
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.
/lgtm
/retest |
2 similar comments
/retest |
/retest |
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.
/lgtm
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bison 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
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.
/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. |
@enxebre: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
Introduce support to set the providerID on the machine spec based on the biosUUID consistently with https://github.com/kubernetes/cloud-provider-vsphere/
/hold