From 6e5632942b57341293b2bfc496b2876eafe52b12 Mon Sep 17 00:00:00 2001 From: terasihma Date: Mon, 18 Dec 2023 05:05:06 +0000 Subject: [PATCH] Remove a log for v1 migration error Signed-off-by: terasihma --- v2/runners/coild_server.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/v2/runners/coild_server.go b/v2/runners/coild_server.go index 74e1b71a..4792c5de 100644 --- a/v2/runners/coild_server.go +++ b/v2/runners/coild_server.go @@ -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" @@ -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")