Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a wait to account for the possiblity of a not ready unix socket #1207

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions pkg/server/api/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down
Loading