From c311ce9fd15ed97033af48b89edbe8b4572c6934 Mon Sep 17 00:00:00 2001 From: adrianc Date: Tue, 28 May 2024 16:40:06 +0300 Subject: [PATCH] dont fail if cache entry not found we should not fail as: 1. there is not much we can do about it 2. its perfectly valid if cmd del completed successfully but runtime called delete cmd again Signed-off-by: adrianc --- cmd/rdma/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/rdma/main.go b/cmd/rdma/main.go index 5cd4921..44e52aa 100644 --- a/cmd/rdma/main.go +++ b/cmd/rdma/main.go @@ -261,7 +261,8 @@ func (plugin *rdmaCniPlugin) CmdDel(args *skel.CmdArgs) error { pRef := plugin.stateCache.GetStateRef(conf.Name, args.ContainerID, args.IfName) err = plugin.stateCache.Load(pRef, &rdmaState) if err != nil { - return err + log.Warn().Msgf("failed to load cache entry(%q). it may have been deleted by a previous CMD_DEL call. %v", pRef, err) + return nil } // Move RDMA device to default namespace