Skip to content

Commit

Permalink
Remove a log for v1 migration error
Browse files Browse the repository at this point in the history
Signed-off-by: terasihma <[email protected]>
  • Loading branch information
terassyi committed Jan 29, 2024
1 parent e53d459 commit 6e56329
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions v2/runners/coild_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"net"
"strings"

"github.com/containernetworking/plugins/pkg/ip"
"github.com/containernetworking/plugins/pkg/ns"
coilv2 "github.com/cybozu-go/coil/v2/api/v2"
"github.com/cybozu-go/coil/v2/pkg/cnirpc"
"github.com/cybozu-go/coil/v2/pkg/constants"
Expand Down Expand Up @@ -254,17 +252,6 @@ func (s *coildServer) Del(ctx context.Context, args *cnirpc.CNIArgs) (*emptypb.E
return nil, newInternalError(err, "failed to destroy pod network")
}

// This is for migration from Coil v1.
// TODO: eventually this block should be removed.
if args.Netns != "" {
err := ns.WithNetNSPath(args.Netns, func(_ ns.NetNS) error {
return ip.DelLinkByName(args.Ifname)
})
if err != nil {
logger.Sugar().Errorw("intentionally ignoring error for v1 migration", "error", err)
}
}

if err := s.nodeIPAM.Free(ctx, args.ContainerId, args.Ifname); err != nil {
logger.Sugar().Errorw("failed to free addresses", "error", err)
return nil, newInternalError(err, "failed to free addresses")
Expand Down

0 comments on commit 6e56329

Please sign in to comment.