Skip to content

Commit 09628f0

Browse files
authoredAug 26, 2020
Merge pull request #388 from andrewsykim/node-fix-delete-1.2
Cherrypick 387 to release-1.2
2 parents bebaf92 + 13cc4ee commit 09628f0

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
@@ -121,19 +121,8 @@ func (i *instances) InstanceID(ctx context.Context, nodeName types.NodeName) (st
121121
return i.nodeManager.nodeNameMap[string(nodeName)].UUID, nil
122122
}
123123

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

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

0 commit comments

Comments
 (0)