Skip to content

fix dockershim cause containerd invalid #1424

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

Merged
merged 1 commit into from
Mar 28, 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
14 changes: 1 addition & 13 deletions pkg/helper/docker_cri_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,7 @@ const (
maxMsgSize = 1024 * 1024 * 16
)

var (
containerdUnixSocket = "/run/containerd/containerd.sock"
dockerShimUnixSocket1 = "/var/run/dockershim.sock"
dockerShimUnixSocket2 = "/run/dockershim.sock"
)
var containerdUnixSocket = "/run/containerd/containerd.sock"

var criRuntimeWrapper *CRIRuntimeWrapper

Expand Down Expand Up @@ -84,14 +80,6 @@ func IsCRIRuntimeValid(criRuntimeEndpoint string) bool {
return true
}

// Verify dockershim.sock existence.
for _, sock := range []string{dockerShimUnixSocket1, dockerShimUnixSocket2} {
if fi, err := os.Stat(sock); err == nil && !fi.IsDir() {
// Having dockershim.sock means k8s + docker cri
return false
}
}

// Verify containerd.sock cri valid.
if fi, err := os.Stat(criRuntimeEndpoint); err == nil && !fi.IsDir() {
if IsCRIStatusValid(criRuntimeEndpoint) {
Expand Down
Loading