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
Cleanup the use of ExternalID as it is deprecated #60692
Conversation
@adnavare: Adding do-not-merge/release-note-label-needed because the release note process has not been followed. One of the following labels is required "release-note", "release-note-action-required", or "release-note-none". 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. |
Hi Folks, I have changed the code to remove ExternalID from node_controller and node_lifecycle_controller. But as ExternalID is deprecated and if not needed, I can go ahead to remove the implementation of ExternalID() from each provider and also delete the field from instances type defined in cloud.go. I wanted to know the feedback from you guys, thanks. |
Can someone please approve the PR to be tested? Thanks |
/ok-to-test |
/assign @jhorwit2 I think these reviewers are closer than me. |
Thanks, I see that unit test failed. I will analyze the gate failure and update the code. |
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.
Thanks for the PR @adnavare! Sadly, I don't think we can move from ExternalID
to InstanceID
this easily since the interface contract is different. ExternalID
explicitly says
// Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound)
and the InstanceID
method does not. From what I can tell quickly looking through some cloud provider implementations this change would cause nodes to not be deleted since some clouds only return the error mentioned above in ExternalID
.
I'd suggest writing a brief proposal and sending it to the working groups email group to get opinions/feedback from as many interested parties as possible.
An interesting point about the deprecation... it seems that the |
Hi @jhorwit2 : Thanks for the review. Yes, true but so far I found only two places where the error returned is used to check future condition and that is in node_controller.go, controller_utils.go and in two unit tests - photon_test.go and vsphere_test.go. |
@jhorwit2: Yes indeed, i noticed that, deprecation note about ExternalID is not present on "Instances" interface |
Yes, due to InstanceID not returning bool,error instead returning bool,nil, I had to change a unit test. I will update based upon the feedback from folks later. I will send out an email to mailing list today asking for feedback whether to replace ExternalID entirely. Thank you. |
This change sounds valid to me. If the implicit functionality of this API (checking Instance existence) is also satisfied by the new API, then it's fine by me. On another note, we seem to be using InstanceID in lieu of ExternalID. There's also a ProviderID - It seems to me like they overlap to some extent. Should we consolidate these and make it one? We have three different IDs to address a node. @adnavare Please join us at the next wg-cloud-provider online meetup. Will share details on slack |
/retest |
@jhorwit2: Yes i agree. As from this week's discussion it is decided in the next week's meeting, representative for each cloud provider will give an idea whether they want to remove ExternalID completely. If so, then I will go ahead and remove the ExternalID method from Instances cloud provider interface. |
/approve |
@@ -1318,24 +1318,6 @@ func (c *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string | |||
return extractNodeAddresses(instance) | |||
} | |||
|
|||
// ExternalID returns the cloud provider ID of the node with the specified nodeName (deprecated). | |||
func (c *Cloud) ExternalID(ctx context.Context, nodeName types.NodeName) (string, error) { |
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.
cc @justinsb
/approve |
ExternalID aliased to InstanceID
ovirt InstanceID is ExternalID with a leading photon InstanceID and ExternalID are copies of the same function gce InstanceID is aws InstanceID is |
The kubelet change is safe, and we plan on removing that field entirely before 1.11. @tallclair for kubelet approval: /assign @tallclair |
/approve |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adnavare, mikedanese, tallclair, wlan0 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 |
release note none. we can roll the release note into #61877 |
Please let me know if any AR is needed from my side on this PR to get it going. Thank you all for reviews and feedback. |
/retest |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
Automatic merge from submit-queue (batch tested with PRs 62590, 62818, 63015, 62922, 63000). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Use BootID instead of ExternalID to check for new instance PR #60692 changed the way that ExternalID is reported on GCE. Its value is no longer the GCE instance ID. It is the instance name. So it cannot be used to determine VM uniqueness across time. Instead, upgrade will check that the boot ID changed. **What this PR does / why we need it**: Node upgrades stall out because the external ID remains the same across upgrades now. **Which issue(s) this PR fixes**: Fixes #62713 **Release note**: ```release-note NONE ```
This got marked as deprecated four years ago [1], and finally removed last year [2]. This is not present at all any more in Kubernetes 1.12. This has been identical to `metadata.name` since [1], so just use the latter directly. In the nodes overview list, don't show the name/ID again in the Address column, as that's just redundant: The first column already shows that. So show the actual address instead. [1] https://github.com/kubernetes/kubernetes/pull/7775/files#diff-e58c0c0709cf6f8a3b00aef6069b66b7 [2] kubernetes/kubernetes#60692
This got marked as deprecated four years ago [1], and finally removed last year [2]. This is not present at all any more in Kubernetes 1.12. This has been identical to `metadata.name` since [1], so just use the latter directly. In the nodes overview list, don't show the name/ID again in the Address column, as that's just redundant: The first column already shows that. So show the actual address instead. [1] https://github.com/kubernetes/kubernetes/pull/7775/files#diff-e58c0c0709cf6f8a3b00aef6069b66b7 [2] kubernetes/kubernetes#60692 Closes #11385
The patch removes ExternalID usage from node_controller
and node_lifecycle_oontroller. The code instead uses InstanceID
which returns the cloud provider ID as well.
fixes #60466