From ed31381e00800fbf5de7ef51fac363a92b2c38f8 Mon Sep 17 00:00:00 2001 From: fioncat Date: Wed, 31 Jul 2024 14:28:21 +0800 Subject: [PATCH] fix(cnivpc): return error when add pod network record failed --- cmd/cnivpc/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/cnivpc/main.go b/cmd/cnivpc/main.go index 31ec8c1..3439f3d 100644 --- a/cmd/cnivpc/main.go +++ b/cmd/cnivpc/main.go @@ -175,6 +175,7 @@ func cmdAdd(args *skel.CmdArgs) error { err = addPodNetworkRecord(podName, podNS, sandBoxId, pNet) if err != nil { ulog.Warnf("Record pod network info for %s/%s, sandbox: %s, error: %v", podName, podNS, sandBoxId, err) + return fmt.Errorf("failed to record pod network: %v", err) } // Fill result routes ulog.Infof("[Result]: %+v", result)