ccm: recognize InstanceNotFound from InstanceID

Otherwise we won't actually delete Nodes in this code path.
This commit is contained in:
Justin Santa Barbara
2018-05-26 22:29:36 -07:00
parent d057795f3b
commit ec12fe1e84

View File

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