mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Return nil as error when instance is not found so that node_controller could delete the node
This commit is contained in:
parent
3a9b6bd50a
commit
1ebea3ad9d
@ -756,11 +756,14 @@ func (vs *VSphere) InstanceExistsByProviderID(ctx context.Context, providerID st
|
||||
return false, err
|
||||
}
|
||||
_, err = vs.InstanceID(ctx, convertToK8sType(nodeName))
|
||||
if err == nil {
|
||||
return true, nil
|
||||
if err != nil {
|
||||
if err == cloudprovider.InstanceNotFound {
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
|
||||
return false, err
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// InstanceShutdownByProviderID returns true if the instance is in safe state to detach volumes
|
||||
|
Loading…
Reference in New Issue
Block a user