containerd 20 (#4100)

* bump containerd-dev to 2.0.2

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update pkg/init libs to containerd-20

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* bump linuxkit CLI containerd deps to 20

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update test/pkg/containerd to work with containerd v2.x tests

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update containerd-dev deps

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update pkg/init and pkg/containerd dependencies

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update test/pkg/containerd deps

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher
2025-02-24 18:40:56 +02:00
committed by GitHub
parent 1d96f04934
commit 198db9089f
1276 changed files with 92053 additions and 32255 deletions

View File

@@ -8,9 +8,9 @@ import (
"os"
"path/filepath"
"github.com/containerd/containerd"
"github.com/containerd/containerd/cio"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/v2/client"
"github.com/containerd/containerd/v2/pkg/cio"
"github.com/containerd/containerd/v2/pkg/namespaces"
"github.com/opencontainers/runtime-spec/specs-go"
log "github.com/sirupsen/logrus"
)
@@ -104,7 +104,7 @@ func stop(ctx context.Context, service, sock, basePath string) (string, uint32,
runtimeConfig := getRuntimeConfig(path)
client, err := containerd.New(sock)
cli, err := client.New(sock)
if err != nil {
return "", 0, "creating containerd client", err
}
@@ -113,7 +113,7 @@ func stop(ctx context.Context, service, sock, basePath string) (string, uint32,
ctx = namespaces.WithNamespace(ctx, runtimeConfig.Namespace)
}
ctr, err := client.LoadContainer(ctx, service)
ctr, err := cli.LoadContainer(ctx, service)
if err != nil {
return "", 0, "loading container", err
}
@@ -160,7 +160,7 @@ func start(ctx context.Context, service, sock, basePath, dumpSpec string) (strin
return "", 0, "preparing filesystem", err
}
client, err := containerd.New(sock)
cli, err := client.New(sock)
if err != nil {
return "", 0, "creating containerd client", err
}
@@ -193,7 +193,7 @@ func start(ctx context.Context, service, sock, basePath, dumpSpec string) (strin
ctx = namespaces.WithNamespace(ctx, runtimeConfig.Namespace)
}
ctr, err := client.NewContainer(ctx, service, containerd.WithSpec(spec))
ctr, err := cli.NewContainer(ctx, service, client.WithSpec(spec))
if err != nil {
return "", 0, "failed to create container", err
}

View File

@@ -8,7 +8,7 @@ import (
"path/filepath"
"strings"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/v2/pkg/namespaces"
log "github.com/sirupsen/logrus"
)

View File

@@ -12,8 +12,8 @@ import (
"syscall"
"time"
"github.com/containerd/containerd"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/v2/client"
"github.com/containerd/errdefs"
"github.com/pelletier/go-toml"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
@@ -23,7 +23,7 @@ const (
containerdOptsFile = "/etc/containerd/runtime-config.toml"
)
func cleanupTask(ctx context.Context, ctr containerd.Container) error {
func cleanupTask(ctx context.Context, ctr client.Container) error {
task, err := ctr.Task(ctx, nil)
if err != nil {
if errdefs.IsNotFound(err) {
@@ -143,7 +143,7 @@ func systemInitCmd(ctx context.Context, args []string) {
}
// connect to containerd
client, err := containerd.New(*sock)
client, err := client.New(*sock)
if err != nil {
log.WithError(err).Fatal("creating containerd client")
}