diff --git a/Protobuild.toml b/Protobuild.toml index f19efaed1..3349a55f0 100644 --- a/Protobuild.toml +++ b/Protobuild.toml @@ -37,7 +37,7 @@ plugins = ["fieldpath"] # disable grpc for this package [[overrides]] # enable ttrpc and disable fieldpath and grpc for the shim -prefixes = ["github.com/containerd/containerd/linux/shim/v1"] +prefixes = ["github.com/containerd/containerd/runtime/linux/shim/v1"] plugins = ["ttrpc"] # Aggregrate the API descriptors to lock down API changes. @@ -51,8 +51,8 @@ ignore_files = [ # Lock down runc config [[descriptors]] -prefix = "github.com/containerd/containerd/linux/runctypes" -target = "linux/runctypes/next.pb.txt" +prefix = "github.com/containerd/containerd/runtime/linux/runctypes" +target = "runtime/linux/runctypes/next.pb.txt" ignore_files = [ "google/protobuf/descriptor.proto", "gogoproto/gogo.proto" diff --git a/cmd/containerd-shim/main_unix.go b/cmd/containerd-shim/main_unix.go index e51bedfeb..c0ef42f1e 100644 --- a/cmd/containerd-shim/main_unix.go +++ b/cmd/containerd-shim/main_unix.go @@ -35,10 +35,10 @@ import ( "time" "github.com/containerd/containerd/events" - "github.com/containerd/containerd/linux/proc" - "github.com/containerd/containerd/linux/shim" - shimapi "github.com/containerd/containerd/linux/shim/v1" "github.com/containerd/containerd/namespaces" + "github.com/containerd/containerd/runtime/linux/proc" + "github.com/containerd/containerd/runtime/linux/shim" + shimapi "github.com/containerd/containerd/runtime/linux/shim/v1" "github.com/containerd/typeurl" ptypes "github.com/gogo/protobuf/types" "github.com/pkg/errors" diff --git a/cmd/containerd-shim/shim_darwin.go b/cmd/containerd-shim/shim_darwin.go index 00ef67023..c8f0f3c89 100644 --- a/cmd/containerd-shim/shim_darwin.go +++ b/cmd/containerd-shim/shim_darwin.go @@ -22,7 +22,7 @@ import ( "os" "os/signal" - "github.com/containerd/containerd/linux/shim" + "github.com/containerd/containerd/runtime/linux/shim" runc "github.com/containerd/go-runc" "github.com/stevvooe/ttrpc" ) diff --git a/cmd/containerd-shim/shim_linux.go b/cmd/containerd-shim/shim_linux.go index 4e17bb8ab..99aa29add 100644 --- a/cmd/containerd-shim/shim_linux.go +++ b/cmd/containerd-shim/shim_linux.go @@ -20,7 +20,7 @@ import ( "os" "os/signal" - "github.com/containerd/containerd/linux/shim" + "github.com/containerd/containerd/runtime/linux/shim" runc "github.com/containerd/go-runc" "github.com/opencontainers/runc/libcontainer/system" "github.com/stevvooe/ttrpc" diff --git a/cmd/containerd-shim/shim_unix.go b/cmd/containerd-shim/shim_unix.go index 5c0ec1407..7b98504a6 100644 --- a/cmd/containerd-shim/shim_unix.go +++ b/cmd/containerd-shim/shim_unix.go @@ -22,7 +22,7 @@ import ( "os" "os/signal" - "github.com/containerd/containerd/linux/shim" + "github.com/containerd/containerd/runtime/linux/shim" runc "github.com/containerd/go-runc" "github.com/stevvooe/ttrpc" ) diff --git a/cmd/containerd/builtins_linux.go b/cmd/containerd/builtins_linux.go index cf84abe65..8f3e95c96 100644 --- a/cmd/containerd/builtins_linux.go +++ b/cmd/containerd/builtins_linux.go @@ -18,8 +18,8 @@ package main import ( _ "github.com/containerd/aufs" - _ "github.com/containerd/containerd/linux" _ "github.com/containerd/containerd/metrics/cgroups" + _ "github.com/containerd/containerd/runtime/linux" _ "github.com/containerd/containerd/snapshots/native" _ "github.com/containerd/containerd/snapshots/overlay" _ "github.com/containerd/zfs" diff --git a/cmd/ctr/commands/shim/shim.go b/cmd/ctr/commands/shim/shim.go index 988299e03..e9e261bc3 100644 --- a/cmd/ctr/commands/shim/shim.go +++ b/cmd/ctr/commands/shim/shim.go @@ -26,7 +26,7 @@ import ( "github.com/containerd/console" "github.com/containerd/containerd/cmd/ctr/commands" - shim "github.com/containerd/containerd/linux/shim/v1" + shim "github.com/containerd/containerd/runtime/linux/shim/v1" "github.com/containerd/typeurl" ptypes "github.com/gogo/protobuf/types" "github.com/opencontainers/runtime-spec/specs-go" diff --git a/container_linux_test.go b/container_linux_test.go index 25f2d47ce..bcec0a90e 100644 --- a/container_linux_test.go +++ b/container_linux_test.go @@ -35,8 +35,8 @@ import ( "github.com/containerd/containerd/cio" "github.com/containerd/containerd/containers" "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/linux/runctypes" "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/runtime/linux/runctypes" specs "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" "golang.org/x/sys/unix" diff --git a/container_opts_unix.go b/container_opts_unix.go index 8ae955113..743688895 100644 --- a/container_opts_unix.go +++ b/container_opts_unix.go @@ -31,9 +31,9 @@ import ( "github.com/containerd/containerd/content" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/images" - "github.com/containerd/containerd/linux/runctypes" "github.com/containerd/containerd/mount" "github.com/containerd/containerd/platforms" + "github.com/containerd/containerd/runtime/linux/runctypes" "github.com/gogo/protobuf/proto" protobuf "github.com/gogo/protobuf/types" digest "github.com/opencontainers/go-digest" diff --git a/metrics/cgroups/cgroups.go b/metrics/cgroups/cgroups.go index 86a2b8e8d..14ceca0cb 100644 --- a/metrics/cgroups/cgroups.go +++ b/metrics/cgroups/cgroups.go @@ -24,12 +24,12 @@ import ( "github.com/containerd/cgroups" eventstypes "github.com/containerd/containerd/api/events" "github.com/containerd/containerd/events" - "github.com/containerd/containerd/linux" "github.com/containerd/containerd/log" "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/plugin" "github.com/containerd/containerd/runtime" + "github.com/containerd/containerd/runtime/linux" metrics "github.com/docker/go-metrics" "github.com/sirupsen/logrus" ) diff --git a/linux/bundle.go b/runtime/linux/bundle.go similarity index 96% rename from linux/bundle.go rename to runtime/linux/bundle.go index e87457131..8aef5a97a 100644 --- a/linux/bundle.go +++ b/runtime/linux/bundle.go @@ -25,9 +25,9 @@ import ( "path/filepath" "github.com/containerd/containerd/events/exchange" - "github.com/containerd/containerd/linux/runctypes" - "github.com/containerd/containerd/linux/shim" - "github.com/containerd/containerd/linux/shim/client" + "github.com/containerd/containerd/runtime/linux/runctypes" + "github.com/containerd/containerd/runtime/linux/shim" + "github.com/containerd/containerd/runtime/linux/shim/client" "github.com/pkg/errors" ) diff --git a/linux/proc/deleted_state.go b/runtime/linux/proc/deleted_state.go similarity index 100% rename from linux/proc/deleted_state.go rename to runtime/linux/proc/deleted_state.go diff --git a/linux/proc/exec.go b/runtime/linux/proc/exec.go similarity index 100% rename from linux/proc/exec.go rename to runtime/linux/proc/exec.go diff --git a/linux/proc/exec_state.go b/runtime/linux/proc/exec_state.go similarity index 100% rename from linux/proc/exec_state.go rename to runtime/linux/proc/exec_state.go diff --git a/linux/proc/init.go b/runtime/linux/proc/init.go similarity index 99% rename from linux/proc/init.go rename to runtime/linux/proc/init.go index 82f9ebdf2..ed7f9066d 100644 --- a/linux/proc/init.go +++ b/runtime/linux/proc/init.go @@ -31,9 +31,9 @@ import ( "time" "github.com/containerd/console" - "github.com/containerd/containerd/linux/runctypes" "github.com/containerd/containerd/log" "github.com/containerd/containerd/mount" + "github.com/containerd/containerd/runtime/linux/runctypes" "github.com/containerd/fifo" runc "github.com/containerd/go-runc" "github.com/containerd/typeurl" diff --git a/linux/proc/init_state.go b/runtime/linux/proc/init_state.go similarity index 100% rename from linux/proc/init_state.go rename to runtime/linux/proc/init_state.go diff --git a/linux/proc/io.go b/runtime/linux/proc/io.go similarity index 100% rename from linux/proc/io.go rename to runtime/linux/proc/io.go diff --git a/linux/proc/process.go b/runtime/linux/proc/process.go similarity index 100% rename from linux/proc/process.go rename to runtime/linux/proc/process.go diff --git a/linux/proc/types.go b/runtime/linux/proc/types.go similarity index 100% rename from linux/proc/types.go rename to runtime/linux/proc/types.go diff --git a/linux/proc/utils.go b/runtime/linux/proc/utils.go similarity index 100% rename from linux/proc/utils.go rename to runtime/linux/proc/utils.go diff --git a/linux/process.go b/runtime/linux/process.go similarity index 98% rename from linux/process.go rename to runtime/linux/process.go index 0790d8a52..bb81dbccf 100644 --- a/linux/process.go +++ b/runtime/linux/process.go @@ -24,8 +24,8 @@ import ( eventstypes "github.com/containerd/containerd/api/events" "github.com/containerd/containerd/api/types/task" "github.com/containerd/containerd/errdefs" - shim "github.com/containerd/containerd/linux/shim/v1" "github.com/containerd/containerd/runtime" + shim "github.com/containerd/containerd/runtime/linux/shim/v1" "github.com/pkg/errors" "github.com/stevvooe/ttrpc" ) diff --git a/linux/runctypes/1.0.pb.txt b/runtime/linux/runctypes/1.0.pb.txt similarity index 100% rename from linux/runctypes/1.0.pb.txt rename to runtime/linux/runctypes/1.0.pb.txt diff --git a/runtime/linux/runctypes/doc.go b/runtime/linux/runctypes/doc.go new file mode 100644 index 000000000..8d074c534 --- /dev/null +++ b/runtime/linux/runctypes/doc.go @@ -0,0 +1,17 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package runctypes diff --git a/linux/runctypes/next.pb.txt b/runtime/linux/runctypes/next.pb.txt similarity index 95% rename from linux/runctypes/next.pb.txt rename to runtime/linux/runctypes/next.pb.txt index 05f41fada..710815c3d 100755 --- a/linux/runctypes/next.pb.txt +++ b/runtime/linux/runctypes/next.pb.txt @@ -1,5 +1,5 @@ file { - name: "github.com/containerd/containerd/linux/runctypes/runc.proto" + name: "github.com/containerd/containerd/runtime/linux/runctypes/runc.proto" package: "containerd.linux.runc" dependency: "gogoproto/gogo.proto" message_type { @@ -176,7 +176,7 @@ file { } } options { - go_package: "github.com/containerd/containerd/linux/runctypes;runctypes" + go_package: "github.com/containerd/containerd/runtime/linux/runctypes;runctypes" } weak_dependency: 0 syntax: "proto3" diff --git a/linux/runctypes/runc.pb.go b/runtime/linux/runctypes/runc.pb.go similarity index 90% rename from linux/runctypes/runc.pb.go rename to runtime/linux/runctypes/runc.pb.go index 00a27bf06..c13d23359 100644 --- a/linux/runctypes/runc.pb.go +++ b/runtime/linux/runctypes/runc.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/containerd/containerd/linux/runctypes/runc.proto +// source: github.com/containerd/containerd/runtime/linux/runctypes/runc.proto /* Package runctypes is a generated protocol buffer package. It is generated from these files: - github.com/containerd/containerd/linux/runctypes/runc.proto + github.com/containerd/containerd/runtime/linux/runctypes/runc.proto It has these top-level messages: RuncOptions @@ -1408,43 +1408,43 @@ var ( ) func init() { - proto.RegisterFile("github.com/containerd/containerd/linux/runctypes/runc.proto", fileDescriptorRunc) + proto.RegisterFile("github.com/containerd/containerd/runtime/linux/runctypes/runc.proto", fileDescriptorRunc) } var fileDescriptorRunc = []byte{ - // 540 bytes of a gzipped FileDescriptorProto + // 541 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x93, 0xc1, 0x6e, 0xd3, 0x40, 0x10, 0x86, 0x6b, 0xda, 0x26, 0xce, 0xa4, 0x29, 0xb0, 0x50, 0xc9, 0x14, 0x91, 0x86, 0x00, 0x52, - 0xb8, 0xa4, 0x12, 0x88, 0x0b, 0xbd, 0xb5, 0x45, 0xa8, 0x02, 0x4a, 0x65, 0x5a, 0x09, 0x71, 0x59, - 0xb9, 0xeb, 0x21, 0x59, 0x25, 0xde, 0x59, 0xed, 0xae, 0xa9, 0x73, 0xeb, 0x13, 0xf0, 0x5c, 0x3d, - 0x72, 0xe4, 0x84, 0x68, 0x5e, 0x04, 0xe4, 0x75, 0x1c, 0xb8, 0x72, 0xe5, 0xf6, 0xcf, 0xf7, 0x8f, - 0x3d, 0xa3, 0x7f, 0x35, 0xb0, 0x37, 0x92, 0x6e, 0x9c, 0x9f, 0x0f, 0x05, 0x65, 0xbb, 0x82, 0x94, - 0x4b, 0xa4, 0x42, 0x93, 0xfe, 0x2d, 0xa7, 0x52, 0xe5, 0xc5, 0xae, 0xc9, 0x95, 0x70, 0x33, 0x8d, - 0xd6, 0xab, 0xa1, 0x36, 0xe4, 0x88, 0x6d, 0xfd, 0x69, 0x1b, 0xfa, 0xb6, 0x61, 0x69, 0x6e, 0xdf, - 0x1d, 0xd1, 0x88, 0x7c, 0xc7, 0x6e, 0xa9, 0xaa, 0xe6, 0xfe, 0xd7, 0x00, 0xda, 0x71, 0xae, 0xc4, - 0x7b, 0xed, 0x24, 0x29, 0xcb, 0x22, 0x68, 0x9a, 0x5c, 0x39, 0x99, 0x61, 0x14, 0xf4, 0x82, 0x41, - 0x2b, 0xae, 0x4b, 0xf6, 0x10, 0x36, 0x16, 0x92, 0x1b, 0x22, 0x17, 0xdd, 0xf0, 0x76, 0x7b, 0xc1, - 0x62, 0x22, 0xc7, 0xee, 0x43, 0x4b, 0x18, 0x99, 0x73, 0x9d, 0xb8, 0x71, 0xb4, 0xea, 0xfd, 0xb0, - 0x04, 0x27, 0x89, 0x1b, 0xb3, 0x27, 0xb0, 0x69, 0x67, 0xd6, 0x61, 0x96, 0x72, 0x31, 0x32, 0x94, - 0xeb, 0x68, 0xad, 0x17, 0x0c, 0xc2, 0xb8, 0xb3, 0xa0, 0x07, 0x1e, 0xf6, 0x2f, 0x57, 0xa1, 0x73, - 0x60, 0x30, 0x71, 0x58, 0xaf, 0xd4, 0x87, 0x8e, 0x22, 0xae, 0xe5, 0x17, 0x72, 0xd5, 0xe4, 0xc0, - 0x7f, 0xd7, 0x56, 0x74, 0x52, 0x32, 0x3f, 0xf9, 0x1e, 0x84, 0xa4, 0x51, 0x71, 0x27, 0xb4, 0x5f, - 0x2c, 0x8c, 0x9b, 0x65, 0x7d, 0x2a, 0x34, 0x7b, 0x06, 0x5b, 0x58, 0x38, 0x34, 0x2a, 0x99, 0xf2, - 0x5c, 0xc9, 0x82, 0x5b, 0x12, 0x13, 0x74, 0xd6, 0x2f, 0x18, 0xc6, 0x77, 0x6a, 0xf3, 0x4c,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xec, 0x7b, + 0x1f, 0x0f, 0xfe, 0xf5, 0xb0, 0x9f, 0xaf, 0xd4, 0x87, 0xb5, 0xb3, 0x96, 0xbb, 0xd9, 0xa7, 0xbf, + 0x03, 0x00, 0x00, 0xff, 0xff, 0x18, 0xa1, 0x4b, 0x5b, 0x27, 0x04, 0x00, 0x00, } diff --git a/linux/runctypes/runc.proto b/runtime/linux/runctypes/runc.proto similarity index 89% rename from linux/runctypes/runc.proto rename to runtime/linux/runctypes/runc.proto index a73b1cafa..ddd3f8d11 100644 --- a/linux/runctypes/runc.proto +++ b/runtime/linux/runctypes/runc.proto @@ -4,7 +4,7 @@ package containerd.linux.runc; import weak "gogoproto/gogo.proto"; -option go_package = "github.com/containerd/containerd/linux/runctypes;runctypes"; +option go_package = "github.com/containerd/containerd/runtime/linux/runctypes;runctypes"; message RuncOptions { string runtime = 1; diff --git a/linux/runtime.go b/runtime/linux/runtime.go similarity index 98% rename from linux/runtime.go rename to runtime/linux/runtime.go index 26dedbfa9..5bbd173c6 100644 --- a/linux/runtime.go +++ b/runtime/linux/runtime.go @@ -33,9 +33,6 @@ import ( "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/events/exchange" "github.com/containerd/containerd/identifiers" - "github.com/containerd/containerd/linux/proc" - "github.com/containerd/containerd/linux/runctypes" - shim "github.com/containerd/containerd/linux/shim/v1" "github.com/containerd/containerd/log" "github.com/containerd/containerd/metadata" "github.com/containerd/containerd/mount" @@ -43,6 +40,9 @@ import ( "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/plugin" "github.com/containerd/containerd/runtime" + "github.com/containerd/containerd/runtime/linux/proc" + "github.com/containerd/containerd/runtime/linux/runctypes" + shim "github.com/containerd/containerd/runtime/linux/shim/v1" runc "github.com/containerd/go-runc" "github.com/containerd/typeurl" ptypes "github.com/gogo/protobuf/types" diff --git a/linux/shim/client/client.go b/runtime/linux/shim/client/client.go similarity index 98% rename from linux/shim/client/client.go rename to runtime/linux/shim/client/client.go index f779d071f..c69cca362 100644 --- a/linux/shim/client/client.go +++ b/runtime/linux/shim/client/client.go @@ -36,9 +36,9 @@ import ( "github.com/stevvooe/ttrpc" "github.com/containerd/containerd/events" - "github.com/containerd/containerd/linux/shim" - shimapi "github.com/containerd/containerd/linux/shim/v1" "github.com/containerd/containerd/log" + "github.com/containerd/containerd/runtime/linux/shim" + shimapi "github.com/containerd/containerd/runtime/linux/shim/v1" "github.com/containerd/containerd/sys" ptypes "github.com/gogo/protobuf/types" ) diff --git a/linux/shim/client/client_linux.go b/runtime/linux/shim/client/client_linux.go similarity index 100% rename from linux/shim/client/client_linux.go rename to runtime/linux/shim/client/client_linux.go diff --git a/linux/shim/client/client_unix.go b/runtime/linux/shim/client/client_unix.go similarity index 100% rename from linux/shim/client/client_unix.go rename to runtime/linux/shim/client/client_unix.go diff --git a/linux/shim/local.go b/runtime/linux/shim/local.go similarity index 98% rename from linux/shim/local.go rename to runtime/linux/shim/local.go index 1600ef6f1..7f2a6d0ef 100644 --- a/linux/shim/local.go +++ b/runtime/linux/shim/local.go @@ -22,8 +22,8 @@ import ( "context" "path/filepath" - shimapi "github.com/containerd/containerd/linux/shim/v1" "github.com/containerd/containerd/mount" + shimapi "github.com/containerd/containerd/runtime/linux/shim/v1" ptypes "github.com/gogo/protobuf/types" ) diff --git a/linux/shim/reaper.go b/runtime/linux/shim/reaper.go similarity index 100% rename from linux/shim/reaper.go rename to runtime/linux/shim/reaper.go diff --git a/linux/shim/service.go b/runtime/linux/shim/service.go similarity index 98% rename from linux/shim/service.go rename to runtime/linux/shim/service.go index 02ac59ef5..7e2e5365c 100644 --- a/linux/shim/service.go +++ b/runtime/linux/shim/service.go @@ -29,12 +29,12 @@ import ( "github.com/containerd/containerd/api/types/task" "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/events" - "github.com/containerd/containerd/linux/proc" - "github.com/containerd/containerd/linux/runctypes" - shimapi "github.com/containerd/containerd/linux/shim/v1" "github.com/containerd/containerd/log" "github.com/containerd/containerd/namespaces" "github.com/containerd/containerd/runtime" + "github.com/containerd/containerd/runtime/linux/proc" + "github.com/containerd/containerd/runtime/linux/runctypes" + shimapi "github.com/containerd/containerd/runtime/linux/shim/v1" runc "github.com/containerd/go-runc" "github.com/containerd/typeurl" ptypes "github.com/gogo/protobuf/types" diff --git a/linux/shim/service_linux.go b/runtime/linux/shim/service_linux.go similarity index 100% rename from linux/shim/service_linux.go rename to runtime/linux/shim/service_linux.go diff --git a/linux/shim/service_unix.go b/runtime/linux/shim/service_unix.go similarity index 100% rename from linux/shim/service_unix.go rename to runtime/linux/shim/service_unix.go diff --git a/runtime/linux/shim/v1/doc.go b/runtime/linux/shim/v1/doc.go new file mode 100644 index 000000000..55bfe47d7 --- /dev/null +++ b/runtime/linux/shim/v1/doc.go @@ -0,0 +1,17 @@ +/* + Copyright The containerd Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +package shim diff --git a/linux/shim/v1/shim.pb.go b/runtime/linux/shim/v1/shim.pb.go similarity index 93% rename from linux/shim/v1/shim.pb.go rename to runtime/linux/shim/v1/shim.pb.go index 2f39e6a78..fb492e257 100644 --- a/linux/shim/v1/shim.pb.go +++ b/runtime/linux/shim/v1/shim.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/containerd/containerd/linux/shim/v1/shim.proto +// source: github.com/containerd/containerd/runtime/linux/shim/v1/shim.proto /* Package shim is a generated protocol buffer package. It is generated from these files: - github.com/containerd/containerd/linux/shim/v1/shim.proto + github.com/containerd/containerd/runtime/linux/shim/v1/shim.proto It has these top-level messages: CreateTaskRequest @@ -4352,80 +4352,80 @@ var ( ) func init() { - proto.RegisterFile("github.com/containerd/containerd/linux/shim/v1/shim.proto", fileDescriptorShim) + proto.RegisterFile("github.com/containerd/containerd/runtime/linux/shim/v1/shim.proto", fileDescriptorShim) } var fileDescriptorShim = []byte{ - // 1133 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x36, 0x69, 0xfd, 0x8e, 0x22, 0xd7, 0xde, 0x3a, 0x2e, 0xa3, 0x00, 0xb2, 0x40, 0xa0, 0x81, - 0x8b, 0x22, 0x54, 0x2d, 0x17, 0x49, 0xd3, 0x02, 0x01, 0x6c, 0x27, 0x28, 0x8c, 0xd6, 0x88, 0x41, - 0x3b, 0x4d, 0xd0, 0xa2, 0x30, 0x68, 0x71, 0x2d, 0x2d, 0x2c, 0x91, 0x0c, 0x77, 0xe9, 0xda, 0x3d, - 0xf5, 0xd4, 0x73, 0x1f, 0xa7, 0x8f, 0xe0, 0x43, 0x0e, 0x3d, 0xf6, 0x94, 0x36, 0xba, 0xf7, 0x1d, - 0x8a, 0xfd, 0x91, 0x49, 0x49, 0x66, 0x48, 0xf9, 0x62, 0x71, 0x76, 0xbf, 0xd9, 0x9d, 0x9d, 0xef, - 0xdb, 0x99, 0x35, 0x3c, 0xe9, 0x11, 0xd6, 0x8f, 0x4e, 0xac, 0xae, 0x3f, 0x6c, 0x77, 0x7d, 0x8f, - 0x39, 0xc4, 0xc3, 0xa1, 0x9b, 0xfc, 0x1c, 0x10, 0x2f, 0xba, 0x68, 0xd3, 0x3e, 0x19, 0xb6, 0xcf, - 0x37, 0xc5, 0xaf, 0x15, 0x84, 0x3e, 0xf3, 0x51, 0x2b, 0x06, 0x59, 0x61, 0xe4, 0x31, 0x32, 0xc4, - 0x96, 0x00, 0x5b, 0x02, 0x74, 0xbe, 0xd9, 0xb8, 0xd7, 0xf3, 0xfd, 0xde, 0x00, 0xb7, 0x05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, 0x17, 0x6f, 0xa6, 0xbb, 0x90, - 0x42, 0x77, 0x71, 0x82, 0xee, 0x0d, 0x28, 0xd0, 0x00, 0x77, 0x85, 0x66, 0xd2, 0xe8, 0x11, 0x08, - 0xf3, 0x2e, 0x7c, 0x3c, 0x11, 0xb9, 0xcc, 0xbb, 0xf9, 0x1a, 0x96, 0x6d, 0x4c, 0xc9, 0xaf, 0xf8, - 0x80, 0x5d, 0x66, 0x1d, 0x67, 0x15, 0x8a, 0xbf, 0x10, 0x97, 0xf5, 0x15, 0x17, 0xd2, 0xe0, 0xa1, - 0xf5, 0x31, 0xe9, 0xf5, 0x25, 0x07, 0x75, 0x5b, 0x59, 0xe6, 0x03, 0xb8, 0xc3, 0x89, 0xc2, 0x59, - 0x39, 0x7d, 0xab, 0x43, 0x5d, 0x01, 0x95, 0x16, 0xe6, 0xbd, 0xa0, 0x4a, 0x3b, 0x8b, 0xb1, 0x76, - 0xb6, 0x78, 0xba, 0x84, 0x6c, 0x78, 0x1a, 0x97, 0x3a, 0xf7, 0x93, 0x17, 0xf3, 0x7c, 0x53, 0xdd, - 0x4d, 0xa9, 0x23, 0x5b, 0x41, 0x63, 0x46, 0x8a, 0x37, 0x33, 0x52, 0x4a, 0x61, 0xa4, 0x3c, 0xc1, - 0x48, 0x92, 0xf3, 0xca, 0x14, 0xe7, 0x53, 0x92, 0xae, 0x7e, 0x58, 0xd2, 0x70, 0x2b, 0x49, 0xbf, - 0x80, 0xda, 0x77, 0x64, 0x30, 0xc8, 0x51, 0xec, 0x28, 0xe9, 0x8d, 0x85, 0x59, 0xb7, 0x95, 0xc5, - 0x73, 0xe9, 0x0c, 0x06, 0x22, 0x97, 0x15, 0x9b, 0x7f, 0x9a, 0x4f, 0x61, 0x69, 0x77, 0xe0, 0x53, - 0xbc, 0xf7, 0x22, 0x87, 0x3e, 0x64, 0x02, 0xa5, 0xd6, 0xa5, 0x61, 0x7e, 0x06, 0x1f, 0x7d, 0x4f, - 0x28, 0x3b, 0x20,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0x68, 0x58, 0x79, 0xe1, 0x32, 0xfa, 0x9d, 0xfd, 0xab, 0xf7, 0xcd, 0x85, 0xbf, 0xdf, 0x37, - 0x17, 0x7e, 0x1b, 0x35, 0xb5, 0xab, 0x51, 0x53, 0xfb, 0x6b, 0xd4, 0xd4, 0xfe, 0x1d, 0x35, 0xb5, - 0x1f, 0xb7, 0xe6, 0xfb, 0xff, 0xf7, 0x1b, 0xfe, 0xfb, 0x5a, 0x3f, 0x29, 0x89, 0x73, 0x6c, 0xfd, - 0x1f, 0x00, 0x00, 0xff, 0xff, 0x4d, 0xd0, 0xe6, 0x46, 0x3f, 0x0f, 0x00, 0x00, + // 1135 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4f, 0x4f, 0xdc, 0x46, + 0x14, 0xc7, 0x66, 0xff, 0xbe, 0xcd, 0x52, 0x98, 0x12, 0xea, 0x6c, 0xa4, 0x65, 0x65, 0xa9, 0x11, + 0x55, 0x15, 0xbb, 0x2c, 0x55, 0xd2, 0x36, 0x52, 0x24, 0x20, 0x51, 0x85, 0xda, 0x28, 0xc8, 0x40, + 0x13, 0xb5, 0xaa, 0x90, 0x59, 0x0f, 0xbb, 0x23, 0x76, 0x6d, 0xc7, 0x33, 0xa6, 0xd0, 0x53, 0x4f, + 0x3d, 0xf7, 0xe3, 0xf4, 0x23, 0x70, 0xc8, 0xa1, 0xc7, 0x9e, 0xd2, 0x86, 0x7b, 0xbf, 0x43, 0x35, + 0x7f, 0x16, 0x7b, 0x77, 0x71, 0x6c, 0xb8, 0xb0, 0x7e, 0x33, 0xbf, 0x37, 0xf3, 0xe6, 0xfd, 0x7e, + 0xf3, 0xde, 0x00, 0x9b, 0x7d, 0xc2, 0x06, 0xf1, 0x91, 0xd5, 0x0b, 0x46, 0x76, 0x2f, 0xf0, 0x99, + 0x4b, 0x7c, 0x1c, 0x79, 0xe9, 0xcf, 0x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x75, 0x3d, 0x54, 0x40, 0x7f, 0x93, 0x0d, 0x32, 0x73, + 0xd1, 0x1f, 0xa0, 0x36, 0x6e, 0x17, 0x99, 0x6c, 0x17, 0x38, 0xc4, 0x4c, 0xcb, 0x39, 0x80, 0x8a, + 0xec, 0x2b, 0x45, 0xaa, 0xd3, 0x4c, 0x07, 0xca, 0x0c, 0x17, 0x43, 0x89, 0xd7, 0xf6, 0x22, 0x0a, + 0x48, 0xb5, 0x8a, 0x96, 0x55, 0x14, 0x2e, 0xa3, 0xdf, 0x3a, 0xb8, 0x78, 0xdf, 0x9e, 0xfb, 0xfb, + 0x7d, 0x7b, 0xee, 0xb7, 0xcb, 0xb6, 0x76, 0x71, 0xd9, 0xd6, 0xfe, 0xba, 0x6c, 0x6b, 0xff, 0x5e, + 0xb6, 0xb5, 0x1f, 0x9f, 0xdc, 0xee, 0xff, 0xe0, 0x27, 0xfc, 0xf7, 0xb5, 0x7e, 0x54, 0x11, 0xe7, + 0xd9, 0xf8, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xfb, 0xc9, 0x30, 0x0d, 0x4f, 0x0f, 0x00, 0x00, } diff --git a/linux/shim/v1/shim.proto b/runtime/linux/shim/v1/shim.proto similarity index 97% rename from linux/shim/v1/shim.proto rename to runtime/linux/shim/v1/shim.proto index 6de8f1382..fb748f71e 100644 --- a/linux/shim/v1/shim.proto +++ b/runtime/linux/shim/v1/shim.proto @@ -9,7 +9,7 @@ import "google/protobuf/timestamp.proto"; import "github.com/containerd/containerd/api/types/mount.proto"; import "github.com/containerd/containerd/api/types/task/task.proto"; -option go_package = "github.com/containerd/containerd/linux/shim/v1;shim"; +option go_package = "github.com/containerd/containerd/runtime/linux/shim/v1;shim"; // Shim service is launched for each container and is responsible for owning the IO // for the container and its additional processes. The shim is also the parent of diff --git a/linux/task.go b/runtime/linux/task.go similarity index 98% rename from linux/task.go rename to runtime/linux/task.go index eca82fbbd..bb5d8c0de 100644 --- a/linux/task.go +++ b/runtime/linux/task.go @@ -28,9 +28,9 @@ import ( "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/events/exchange" "github.com/containerd/containerd/identifiers" - "github.com/containerd/containerd/linux/shim/client" - shim "github.com/containerd/containerd/linux/shim/v1" "github.com/containerd/containerd/runtime" + "github.com/containerd/containerd/runtime/linux/shim/client" + shim "github.com/containerd/containerd/runtime/linux/shim/v1" runc "github.com/containerd/go-runc" "github.com/gogo/protobuf/types" "github.com/pkg/errors" diff --git a/task_opts.go b/task_opts.go index 495d4225b..6f2897726 100644 --- a/task_opts.go +++ b/task_opts.go @@ -21,8 +21,8 @@ import ( "syscall" "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/linux/runctypes" "github.com/containerd/containerd/mount" + "github.com/containerd/containerd/runtime/linux/runctypes" ) // NewTaskOpts allows the caller to set options on a new task diff --git a/task_opts_linux.go b/task_opts_linux.go index dab72808a..551cb996c 100644 --- a/task_opts_linux.go +++ b/task_opts_linux.go @@ -20,7 +20,7 @@ import ( "context" "errors" - "github.com/containerd/containerd/linux/runctypes" + "github.com/containerd/containerd/runtime/linux/runctypes" "github.com/opencontainers/runtime-spec/specs-go" ) diff --git a/task_opts_linux_test.go b/task_opts_linux_test.go index cc640228d..25df57ba2 100644 --- a/task_opts_linux_test.go +++ b/task_opts_linux_test.go @@ -20,7 +20,7 @@ import ( "context" "testing" - "github.com/containerd/containerd/linux/runctypes" + "github.com/containerd/containerd/runtime/linux/runctypes" ) func TestWithNoNewKeyringAddsNoNewKeyringToOptions(t *testing.T) { diff --git a/vendor.conf b/vendor.conf index fe20273ec..4413d4bcd 100644 --- a/vendor.conf +++ b/vendor.conf @@ -44,7 +44,7 @@ github.com/gotestyourself/gotestyourself 44dbf532bbf5767611f6f2a61bded572e337010 github.com/google/go-cmp v0.1.0 # cri dependencies -github.com/containerd/cri v1.0.0 +github.com/containerd/cri 0d01163f9cbe4f353ca1b844230eeab37cd04f35 https://github.com/ehazlett/cri github.com/containerd/go-cni f2d7272f12d045b16ed924f50e91f9f9cecc55a7 github.com/blang/semver v3.1.0 github.com/containernetworking/cni v0.6.0 diff --git a/vendor/github.com/containerd/cri/README.md b/vendor/github.com/containerd/cri/README.md index 938b8dded..3ebdcffd8 100644 --- a/vendor/github.com/containerd/cri/README.md +++ b/vendor/github.com/containerd/cri/README.md @@ -1,7 +1,7 @@ # cri

- - + +

*Note: The standalone `cri-containerd` binary is end-of-life. `cri-containerd` is diff --git a/vendor/github.com/containerd/cri/pkg/containerd/opts/task.go b/vendor/github.com/containerd/cri/pkg/containerd/opts/task.go index 2d4475790..7cac8ca0c 100644 --- a/vendor/github.com/containerd/cri/pkg/containerd/opts/task.go +++ b/vendor/github.com/containerd/cri/pkg/containerd/opts/task.go @@ -20,7 +20,7 @@ import ( "context" "github.com/containerd/containerd" - "github.com/containerd/containerd/linux/runctypes" + "github.com/containerd/containerd/runtime/linux/runctypes" ) // WithContainerdShimCgroup returns function that sets the containerd diff --git a/vendor/github.com/containerd/cri/pkg/os/os.go b/vendor/github.com/containerd/cri/pkg/os/os.go index f0e7a3271..30252cbc2 100644 --- a/vendor/github.com/containerd/cri/pkg/os/os.go +++ b/vendor/github.com/containerd/cri/pkg/os/os.go @@ -22,9 +22,8 @@ import ( "os" "path/filepath" - containerdmount "github.com/containerd/containerd/mount" + "github.com/containerd/containerd/mount" "github.com/containerd/fifo" - "github.com/docker/docker/pkg/mount" "github.com/docker/docker/pkg/symlink" "golang.org/x/net/context" "golang.org/x/sys/unix" @@ -42,8 +41,8 @@ type OS interface { CopyFile(src, dest string, perm os.FileMode) error WriteFile(filename string, data []byte, perm os.FileMode) error Mount(source string, target string, fstype string, flags uintptr, data string) error - Unmount(target string, flags int) error - LookupMount(path string) (containerdmount.Info, error) + Unmount(target string) error + LookupMount(path string) (mount.Info, error) } // RealOS is used to dispatch the real system level operations. @@ -115,20 +114,23 @@ func (RealOS) Mount(source string, target string, fstype string, flags uintptr, } // Unmount will call Unmount to unmount the file. -func (RealOS) Unmount(target string, flags int) error { - return Unmount(target, flags) +func (RealOS) Unmount(target string) error { + return Unmount(target) } // LookupMount gets mount info of a given path. -func (RealOS) LookupMount(path string) (containerdmount.Info, error) { - return containerdmount.Lookup(path) +func (RealOS) LookupMount(path string) (mount.Info, error) { + return mount.Lookup(path) } -// Unmount will call unix.Unmount to unmount the file. The function doesn't -// return error if target is not mounted. -func Unmount(target string, flags int) error { - if mounted, err := mount.Mounted(target); err != nil || !mounted { - return err +// Unmount unmounts the target. It does not return an error in case the target is not mounted. +// In case the target does not exist, the appropriate error is returned. +func Unmount(target string) error { + err := unix.Unmount(target, unix.MNT_DETACH) + if err == unix.EINVAL { + // ignore "not mounted" error + err = nil } - return unix.Unmount(target, flags) + + return err } diff --git a/vendor/github.com/containerd/cri/pkg/server/container_create.go b/vendor/github.com/containerd/cri/pkg/server/container_create.go index c4f730d0d..6b1c5626e 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_create.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_create.go @@ -27,9 +27,9 @@ import ( "github.com/containerd/containerd/containers" "github.com/containerd/containerd/contrib/apparmor" "github.com/containerd/containerd/contrib/seccomp" - "github.com/containerd/containerd/linux/runctypes" "github.com/containerd/containerd/mount" "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/runtime/linux/runctypes" "github.com/containerd/typeurl" "github.com/davecgh/go-spew/spew" imagespec "github.com/opencontainers/image-spec/specs-go/v1" @@ -523,7 +523,7 @@ func clearReadOnly(m *runtimespec.Mount) { opt = append(opt, o) } } - m.Options = opt + m.Options = append(opt, "rw") } // addDevices set device mapping without privilege. @@ -662,7 +662,7 @@ func setOCIBindMountsPrivileged(g *generate.Generator) { spec := g.Spec() // clear readonly for /sys and cgroup for i, m := range spec.Mounts { - if spec.Mounts[i].Destination == "/sys" && !spec.Root.Readonly { + if spec.Mounts[i].Destination == "/sys" { clearReadOnly(&spec.Mounts[i]) } if m.Type == "cgroup" { diff --git a/vendor/github.com/containerd/cri/pkg/server/container_stats_list.go b/vendor/github.com/containerd/cri/pkg/server/container_stats_list.go index 3b4d8c93d..f0605ef77 100644 --- a/vendor/github.com/containerd/cri/pkg/server/container_stats_list.go +++ b/vendor/github.com/containerd/cri/pkg/server/container_stats_list.go @@ -109,8 +109,10 @@ func (c *criService) getContainerMetrics( } if metrics.Memory != nil && metrics.Memory.Usage != nil { cs.Memory = &runtime.MemoryUsage{ - Timestamp: stats.Timestamp.UnixNano(), - WorkingSetBytes: &runtime.UInt64Value{Value: metrics.Memory.Usage.Usage}, + Timestamp: stats.Timestamp.UnixNano(), + WorkingSetBytes: &runtime.UInt64Value{ + Value: getWorkingSet(metrics.Memory), + }, } } } @@ -167,3 +169,17 @@ func matchLabelSelector(selector, labels map[string]string) bool { } return true } + +// getWorkingSet calculates workingset memory from cgroup memory stats. +// The caller should make sure memory is not nil. +// workingset = usage - total_inactive_file +func getWorkingSet(memory *cgroups.MemoryStat) uint64 { + if memory.Usage == nil { + return 0 + } + var workingSet uint64 + if memory.TotalInactiveFile < memory.Usage.Usage { + workingSet = memory.Usage.Usage - memory.TotalInactiveFile + } + return workingSet +} diff --git a/vendor/github.com/containerd/cri/pkg/server/helpers.go b/vendor/github.com/containerd/cri/pkg/server/helpers.go index b09f28151..d5a314446 100644 --- a/vendor/github.com/containerd/cri/pkg/server/helpers.go +++ b/vendor/github.com/containerd/cri/pkg/server/helpers.go @@ -27,7 +27,7 @@ import ( "github.com/containerd/containerd" "github.com/containerd/containerd/containers" "github.com/containerd/containerd/content" - "github.com/containerd/containerd/linux/runctypes" + "github.com/containerd/containerd/runtime/linux/runctypes" "github.com/containerd/typeurl" "github.com/docker/distribution/reference" imagedigest "github.com/opencontainers/go-digest" diff --git a/vendor/github.com/containerd/cri/pkg/server/image_pull.go b/vendor/github.com/containerd/cri/pkg/server/image_pull.go index aea3db8c9..4db105e06 100644 --- a/vendor/github.com/containerd/cri/pkg/server/image_pull.go +++ b/vendor/github.com/containerd/cri/pkg/server/image_pull.go @@ -100,20 +100,14 @@ func (c *criService) PullImage(ctx context.Context, r *runtime.PullImageRequest) // image has already been converted. isSchema1 := desc.MediaType == containerdimages.MediaTypeDockerSchema1Manifest - // TODO(mikebrow): add truncIndex for image id image, err := c.client.Pull(ctx, ref, containerd.WithSchema1Conversion, containerd.WithResolver(resolver), + containerd.WithPullSnapshotter(c.config.ContainerdConfig.Snapshotter), + containerd.WithPullUnpack, ) if err != nil { - return nil, errors.Wrapf(err, "failed to pull image %q", ref) - } - - // Do best effort unpack. - logrus.Debugf("Unpack image %q", imageRef) - if err := image.Unpack(ctx, c.config.ContainerdConfig.Snapshotter); err != nil { - logrus.WithError(err).Warnf("Failed to unpack image %q", imageRef) - // Do not fail image pulling. Unpack will be retried before container creation. + return nil, errors.Wrapf(err, "failed to pull and unpack image %q", ref) } // Get image information. diff --git a/vendor/github.com/containerd/cri/pkg/server/sandbox_run.go b/vendor/github.com/containerd/cri/pkg/server/sandbox_run.go index cfa085835..5fa198e4a 100644 --- a/vendor/github.com/containerd/cri/pkg/server/sandbox_run.go +++ b/vendor/github.com/containerd/cri/pkg/server/sandbox_run.go @@ -24,8 +24,8 @@ import ( "github.com/containerd/containerd" containerdio "github.com/containerd/containerd/cio" "github.com/containerd/containerd/errdefs" - "github.com/containerd/containerd/linux/runctypes" "github.com/containerd/containerd/oci" + "github.com/containerd/containerd/runtime/linux/runctypes" cni "github.com/containerd/go-cni" "github.com/containerd/typeurl" imagespec "github.com/opencontainers/image-spec/specs-go/v1" @@ -494,16 +494,14 @@ func parseDNSOptions(servers, searches, options []string) (string, error) { } // unmountSandboxFiles unmount some sandbox files, we rely on the removal of sandbox root directory to -// remove these files. Unmount should *NOT* return error when: -// 1) The mount point is already unmounted. -// 2) The mount point doesn't exist. +// remove these files. Unmount should *NOT* return error if the mount point is already unmounted. func (c *criService) unmountSandboxFiles(id string, config *runtime.PodSandboxConfig) error { if config.GetLinux().GetSecurityContext().GetNamespaceOptions().GetIpc() != runtime.NamespaceMode_NODE { path, err := c.os.FollowSymlinkInScope(c.getSandboxDevShm(id), "/") if err != nil { return errors.Wrap(err, "failed to follow symlink") } - if err := c.os.Unmount(path, unix.MNT_DETACH); err != nil && !os.IsNotExist(err) { + if err := c.os.Unmount(path); err != nil && !os.IsNotExist(err) { return errors.Wrapf(err, "failed to unmount %q", path) } } diff --git a/vendor/github.com/containerd/cri/pkg/store/sandbox/netns.go b/vendor/github.com/containerd/cri/pkg/store/sandbox/netns.go index 5d56d9222..a96eb6aad 100644 --- a/vendor/github.com/containerd/cri/pkg/store/sandbox/netns.go +++ b/vendor/github.com/containerd/cri/pkg/store/sandbox/netns.go @@ -23,7 +23,6 @@ import ( cnins "github.com/containernetworking/plugins/pkg/ns" "github.com/docker/docker/pkg/symlink" "github.com/pkg/errors" - "golang.org/x/sys/unix" osinterface "github.com/containerd/cri/pkg/os" ) @@ -93,7 +92,7 @@ func (n *NetNS) Remove() error { if err != nil { return errors.Wrap(err, "failed to follow symlink") } - if err := osinterface.Unmount(path, unix.MNT_DETACH); err != nil && !os.IsNotExist(err) { + if err := osinterface.Unmount(path); err != nil && !os.IsNotExist(err) { return errors.Wrap(err, "failed to umount netns") } if err := os.RemoveAll(path); err != nil { diff --git a/vendor/github.com/containerd/cri/vendor.conf b/vendor/github.com/containerd/cri/vendor.conf index 0e9fdc8d9..73742b1c7 100644 --- a/vendor/github.com/containerd/cri/vendor.conf +++ b/vendor/github.com/containerd/cri/vendor.conf @@ -4,11 +4,11 @@ github.com/boltdb/bolt e9cf4fae01b5a8ff89d0ec6b32f0d9c9f79aefdd github.com/BurntSushi/toml a368813c5e648fee92e5f6c30e3944ff9d5e8895 github.com/containerd/cgroups fe281dd265766145e943a034aa41086474ea6130 github.com/containerd/console cb7008ab3d8359b78c5f464cb7cf160107ad5925 -github.com/containerd/containerd 1381f8fddc4f826e12b48d46c9def347d5aa338a -github.com/containerd/continuity 3e8f2ea4b190484acb976a5b378d373429639a1a +github.com/containerd/containerd 62da044848bffac9b68221a69f5bb4aed65fc3ef https://github.com/ehazlett/containerd +github.com/containerd/continuity 2d3749b4da569ac97ca63dccba5eee4f5ee2beab github.com/containerd/fifo 3d5202aec260678c48179c56f40e6f38a095738c github.com/containerd/go-cni f2d7272f12d045b16ed924f50e91f9f9cecc55a7 -github.com/containerd/go-runc bcb223a061a3dd7de1a89c0b402a60f4dd9bd307 +github.com/containerd/go-runc f271fa2021de855d4d918dbef83c5fe19db1bdd5 github.com/containerd/typeurl f6943554a7e7e88b3c14aad190bf05932da84788 github.com/containernetworking/cni v0.6.0 github.com/containernetworking/plugins v0.7.0 @@ -34,8 +34,8 @@ github.com/hashicorp/go-multierror ed905158d87462226a13fe39ddf685ea65f1c11f github.com/json-iterator/go 1.0.4 github.com/matttproud/golang_protobuf_extensions v1.0.0 github.com/Microsoft/go-winio v0.4.5 -github.com/Microsoft/hcsshim v0.6.7 -github.com/opencontainers/go-digest 21dfd564fd89c944783d00d069f33e3e7123c448 +github.com/Microsoft/hcsshim v0.6.10 +github.com/opencontainers/go-digest c9281466c8b2f606084ac71339773efd177436e7 github.com/opencontainers/image-spec v1.0.1 github.com/opencontainers/runc 69663f0bd4b60df09991c08812a60108003fa340 github.com/opencontainers/runtime-spec v1.0.1 @@ -56,7 +56,7 @@ github.com/syndtr/gocapability db04d3cc01c8b54962a58ec7e491717d06cfcc16 github.com/tchap/go-patricia 5ad6cdb7538b0097d5598c7e57f0a24072adf7dc github.com/urfave/cli 7bc6a0acffa589f415f88aca16cc1de5ffd66f9c golang.org/x/crypto 49796115aa4b964c318aad4f3084fdb41e9aa067 -golang.org/x/net 7dcfb8076726a3fdd9353b6b8a1f1b6be6811bd6 +golang.org/x/net b3756b4b77d7b13260a0a2ec658753cf48922eac golang.org/x/sync 450f422ab23cf9881c94e2db30cac0eb1b7cf80c golang.org/x/sys 314a259e304ff91bd6985da2a7149bbf91237993 https://github.com/golang/sys golang.org/x/text 19e51611da83d6be54ddafce4a4af510cb3e9ea4