File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
pkg/cloudprovider/providers/aws Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1386,7 +1386,9 @@ func (c *Cloud) InstanceShutdownByProviderID(ctx context.Context, providerID str
13861386 }
13871387 if len (instances ) == 0 {
13881388 glog .Warningf ("the instance %s does not exist anymore" , providerID )
1389- return true , nil
1389+ // returns false, because otherwise node is not deleted from cluster
1390+ // false means that it will continue to check InstanceExistsByProviderID
1391+ return false , nil
13901392 }
13911393 if len (instances ) > 1 {
13921394 return false , fmt .Errorf ("multiple instances found for instance: %s" , instanceID )
@@ -1396,7 +1398,7 @@ func (c *Cloud) InstanceShutdownByProviderID(ctx context.Context, providerID str
13961398 if instance .State != nil {
13971399 state := aws .StringValue (instance .State .Name )
13981400 // valid state for detaching volumes
1399- if state == ec2 .InstanceStateNameStopped || state == ec2 . InstanceStateNameTerminated {
1401+ if state == ec2 .InstanceStateNameStopped {
14001402 return true , nil
14011403 }
14021404 }
You can’t perform that action at this time.
0 commit comments