From 081539ec3a850ea26821daf54d9a5e13fe7f50ac Mon Sep 17 00:00:00 2001 From: Oleg Atamanenko Date: Mon, 22 Jul 2019 09:19:03 -0700 Subject: [PATCH] Detach ENI before deleting --- pkg/awsutils/awsutils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/awsutils/awsutils.go b/pkg/awsutils/awsutils.go index 26c9adacb9..68d9c1063d 100644 --- a/pkg/awsutils/awsutils.go +++ b/pkg/awsutils/awsutils.go @@ -572,7 +572,7 @@ func (cache *EC2InstanceMetadataCache) AllocENI(useCustomCfg bool, sg []*string, awsAPILatency.WithLabelValues("ModifyNetworkInterfaceAttribute", fmt.Sprint(err != nil)).Observe(msSince(start)) if err != nil { awsAPIErrInc("ModifyNetworkInterfaceAttribute", err) - err := cache.deleteENI(eniID) + err := cache.FreeENI(eniID) if err != nil { awsUtilsErrInc("ENICleanupUponModifyNetworkErr", err) }