Skip to content

Commit

Permalink
Revert "Pin containerd runtime to v1"
Browse files Browse the repository at this point in the history
This reverts commit 9290c15.

This was pinned during the upgrade to containerd 1.3 series, which
changed the default runtime on Linux to io.containerd.runc.v2.

No specific rationale was listed for this pinning, and clearly it's the
wrong thing to do in the presence of Windows, which does not have this
runtime.

Instead, we rely on the containerd-internal defaults, which distinguish
the runtimes for Linux and Windows.

Signed-off-by: Paul "TBBle" Hampson <[email protected]>
  • Loading branch information
TBBle committed Jan 25, 2020
1 parent 4080916 commit 965d723
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func TestIntegration(t *testing.T) {
}

func newContainerd(cdAddress string) (*containerd.Client, error) {
return containerd.New(cdAddress, containerd.WithTimeout(60*time.Second), containerd.WithDefaultRuntime("io.containerd.runtime.v1.linux"))
return containerd.New(cdAddress, containerd.WithTimeout(60*time.Second))
}

func testBridgeNetworking(t *testing.T, sb integration.Sandbox) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/buildctl/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func testBuildContainerdExporter(t *testing.T, sb integration.Sandbox) {
err = cmd.Run()
require.NoError(t, err)

client, err := containerd.New(cdAddress, containerd.WithTimeout(60*time.Second), containerd.WithDefaultRuntime("io.containerd.runtime.v1.linux"))
client, err := containerd.New(cdAddress, containerd.WithTimeout(60*time.Second))
require.NoError(t, err)
defer client.Close()

Expand Down
2 changes: 1 addition & 1 deletion frontend/dockerfile/dockerfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4591,7 +4591,7 @@ loop0:
}

func newContainerd(cdAddress string) (*containerd.Client, error) {
return containerd.New(cdAddress, containerd.WithTimeout(60*time.Second), containerd.WithDefaultRuntime("io.containerd.runtime.v1.linux"))
return containerd.New(cdAddress, containerd.WithTimeout(60*time.Second))
}

func dfCmdArgs(ctx, dockerfile, args string) (string, string) {
Expand Down
5 changes: 1 addition & 4 deletions worker/containerd/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ import (

// NewWorkerOpt creates a WorkerOpt.
func NewWorkerOpt(root string, address, snapshotterName, ns string, labels map[string]string, dns *oci.DNSConfig, nopt netproviders.Opt, opts ...containerd.ClientOpt) (base.WorkerOpt, error) {
opts = append(opts,
containerd.WithDefaultNamespace(ns),
containerd.WithDefaultRuntime("io.containerd.runtime.v1.linux"),
)
opts = append(opts, containerd.WithDefaultNamespace(ns))
client, err := containerd.New(address, opts...)
if err != nil {
return base.WorkerOpt{}, errors.Wrapf(err, "failed to connect client to %q . make sure containerd is running", address)
Expand Down

0 comments on commit 965d723

Please sign in to comment.