ccm: recognize InstanceNotFound from InstanceID

Otherwise we won't actually delete Nodes in this code path.
pull/8/head
Justin Santa Barbara 2018-05-26 22:29:36 -07:00
parent d057795f3b
commit ec12fe1e84
1 changed files with 3 additions and 0 deletions

View File

@ -445,6 +445,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
}