-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
[CCM] Cloud node controller will not remove nodes that no longer exists for cloud providers that require ProviderID #50985
Comments
@jhorwit2
Note: Method 1 will trigger an email to the group. You can find the group list here and label list here. |
/sig cluster-lifecycle |
/area cloudprovider |
@jhorwit2 I agree, Currently VSphere calls Exists() to check whether node exists. But other cloud providers call ExternalID(nodeName) which is deprecated. |
@jhorwit2 Thanks for finding this bug and filing this issue :) I'll be happy to review it if you make a PR |
/assign wlan0 |
@wlan0 i'll start work on the PR. 👍 |
cc @thockin ^ |
…e-exists Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388) Add InstanceExistsByProviderID to cloud provider interface for CCM **What this PR does / why we need it**: Currently, [`MonitorNode()`](https://github.com/kubernetes/kubernetes/blob/02b520f0a40be2056d91fc0661c2b4fdb2694c30/pkg/controller/cloud/nodecontroller.go#L240) in the node controller checks with the CCM if a node still exists by calling `ExternalID(nodeName)`. `ExternalID` is supposed to return the provider id of a node which is not supported on every cloud. This means that any clouds who cannot infer the provider id by the node name from a remote location will never remove nodes that no longer exist. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #50985 **Special notes for your reviewer**: We'll want to create a subsequent issue to track the implementation of these two new methods in the cloud providers. **Release note**: ```release-note Adds `InstanceExists` and `InstanceExistsByProviderID` to cloud provider interface for the cloud controller manager ``` /cc @wlan0 @thockin @andrewsykim @luxas @jhorwit2 /area cloudprovider /sig cluster-lifecycle
…cm-instance-exists Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388) Add InstanceExistsByProviderID to cloud provider interface for CCM **What this PR does / why we need it**: Currently, [`MonitorNode()`](https://github.com/kubernetes/kubernetes/blob/02b520f0a40be2056d91fc0661c2b4fdb2694c30/pkg/controller/cloud/nodecontroller.go#L240) in the node controller checks with the CCM if a node still exists by calling `ExternalID(nodeName)`. `ExternalID` is supposed to return the provider id of a node which is not supported on every cloud. This means that any clouds who cannot infer the provider id by the node name from a remote location will never remove nodes that no longer exist. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes kubernetes#50985 **Special notes for your reviewer**: We'll want to create a subsequent issue to track the implementation of these two new methods in the cloud providers. **Release note**: ```release-note Adds `InstanceExists` and `InstanceExistsByProviderID` to cloud provider interface for the cloud controller manager ``` /cc @wlan0 @thockin @andrewsykim @luxas @jhorwit2 /area cloudprovider /sig cluster-lifecycle
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
@wlan0 mentioned here that:
Currently,
MonitorNode()
in the node controller only checks with the CCM if a node still exists by callingExternalID(nodeName)
.ExternalID
is supposed to return the provider id of a node by its node name which is not supported on every cloud. This means that any clouds who cannot infer the provider id by the node name from a remote location will never remove nodes that no longer exist.What you expected to happen:
I'd expect the cloud node controller to ask the CCM if the instance still exists by node name and provider id just like the other methods in the cloud provider interface.
Other
It seems weird to me that we check if a node exists by calling
ExternalID(nodeName)
. I feel we should add two more methods to theInstances
interface for this purpose like:Exists(nodeName types.NodeName) (bool, error)
ExistsByProviderID(providerID string) (bool, error)
I see in some places that
ExternalID
has deprecated; however, I can't find anywhere that says what it was deprecated in favor of. Sorry if this is a duplicate of an existing issue/proposal.cc @wlan0 @andrewsykim @luxas
related: #48690
The text was updated successfully, but these errors were encountered: