Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for CI failure #1470

Merged
merged 2 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/awsutils/awsutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ func (cache *EC2InstanceMetadataCache) RefreshSGIDs(mac string) error {
for _, eni := range allENIs {
eniIDs = append(eniIDs, eni.ENIID)
}

newENIs := StringSet{}
newENIs.Set(eniIDs)

Expand All @@ -481,9 +481,9 @@ func (cache *EC2InstanceMetadataCache) RefreshSGIDs(mac string) error {
}
awsAPIErrInc("ModifyNetworkInterfaceAttribute", err)
//No need to return error here since retry will happen in 30seconds and also
//If update failed due to stale ENI then returning error will prevent updating SG
//for following ENIs since the list is sorted
log.Debugf("refreshSGIDs: unable to update the ENI %s SG - %v", eniID, err)
//If update failed due to stale ENI then returning error will prevent updating SG
//for following ENIs since the list is sorted
log.Debugf("refreshSGIDs: unable to update the ENI %s SG - %v", eniID, err)
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions pkg/eniconfig/eniconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package eniconfig

import (
"context"
"fmt"
"os"

"k8s.io/apimachinery/pkg/types"
Expand Down Expand Up @@ -75,7 +74,7 @@ func MyENIConfig(ctx context.Context, k8sClient client.Client) (*v1alpha1.ENICon
var eniConfig v1alpha1.ENIConfig
err = k8sClient.Get(ctx, types.NamespacedName{Name: eniConfigName}, &eniConfig)
if err != nil {
fmt.Errorf("error while retrieving eniconfig: %s", err)
log.Errorf("error while retrieving eniconfig: %s", err)
return nil, ErrNoENIConfig
}

Expand Down Expand Up @@ -120,7 +119,7 @@ func GetNodeSpecificENIConfigName(ctx context.Context, k8sClient client.Client)
var node corev1.Node
err := k8sClient.Get(ctx, types.NamespacedName{Name: os.Getenv("MY_NODE_NAME")}, &node)
if err != nil {
fmt.Errorf("error retrieving node: %s", err)
log.Errorf("error retrieving node: %s", err)
return eniConfigName, err
}

Expand Down