Skip to content

Commit 22e8563

Browse files
authored
Merge pull request #387 from andrewsykim/node-delete-uuid
Skip node deletion by VM name due to race conditions with vmtools
2 parents 7bc4338 + 562ba50 commit 22e8563

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

pkg/cloudprovider/vsphere/instances.go

+2-13
Original file line numberDiff line numberDiff line change
@@ -123,19 +123,8 @@ func (i *instances) InstanceID(ctx context.Context, nodeName types.NodeName) (st
123123
return i.nodeManager.nodeNameMap[string(nodeName)].UUID, nil
124124
}
125125

126-
if err != vclib.ErrNoVMFound {
127-
klog.V(4).Infof("instances.InstanceID() failed with err: %v", err)
128-
return "", err
129-
}
130-
131-
// at this point, err is vclib.ErrNoVMFound
132-
if _, ok := os.LookupEnv("SKIP_NODE_DELETION"); ok {
133-
klog.V(4).Infof("instances.InstanceID() NOT FOUND for node %s. Override and prevent deletion.", string(nodeName))
134-
return "", err
135-
}
136-
137-
klog.V(4).Info("instances.InstanceID() NOT FOUND with ", string(nodeName))
138-
return "", cloudprovider.InstanceNotFound
126+
klog.V(4).Infof("instances.InstanceID() failed with err: %v", err)
127+
return "", err
139128
}
140129

141130
// InstanceType returns the type of the instance identified by name.

0 commit comments

Comments
 (0)