Merge pull request #64368 from justinsb/ccm_instanceid_fix

Automatic merge from submit-queue. 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>.

ccm: recognize InstanceNotFound from InstanceID

Otherwise we won't actually delete Nodes in this code path.

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-06-02 04:48:38 -07:00 committed by GitHub
commit 0757e05e78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -449,6 +449,9 @@ func ensureNodeExistsByProviderID(instances cloudprovider.Instances, node *v1.No
var err error
providerID, err = instances.InstanceID(context.TODO(), types.NodeName(node.Name))
if err != nil {
if err == cloudprovider.InstanceNotFound {
return false, nil
}
return false, err
}