From a70da3556a41a04386e1f8049c2ea18f5feebc61 Mon Sep 17 00:00:00 2001 From: Tomofumi Hayashi Date: Thu, 11 Jan 2024 13:34:37 +0900 Subject: [PATCH] Fix a wait to account for the possiblity of a not ready unix socket (#1207) --- pkg/server/api/shim.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/server/api/shim.go b/pkg/server/api/shim.go index 01018ddd4..d1463d6d8 100644 --- a/pkg/server/api/shim.go +++ b/pkg/server/api/shim.go @@ -24,8 +24,6 @@ import ( cnitypes "github.com/containernetworking/cni/pkg/types" "gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/logging" - - utilwait "k8s.io/apimachinery/pkg/util/wait" ) // ShimNetConf for the SHIM cni config file written in json @@ -90,10 +88,7 @@ func postRequest(args *skel.CmdArgs) (*Response, string, error) { } var body []byte - err = utilwait.PollImmediate(APIReadyPollDuration, APIReadyPollTimeout, func() (bool, error) { - body, err = DoCNI("http://dummy/cni", cniRequest, SocketPath(multusShimConfig.MultusSocketDir)) - return err == nil, nil - }) + body, err = DoCNI("http://dummy/cni", cniRequest, SocketPath(multusShimConfig.MultusSocketDir)) if err != nil { return nil, multusShimConfig.CNIVersion, err }