Lorenz Brun | c88c82d | 2020-05-08 14:35:04 +0200 | [diff] [blame] | 1 | Copyright 2020 The Monogon Project Authors. |
| 2 | |
| 3 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | you may not use this file except in compliance with the License. |
| 5 | You may obtain a copy of the License at |
| 6 | |
| 7 | http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | |
| 9 | Unless required by applicable law or agreed to in writing, software |
| 10 | distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | See the License for the specific language governing permissions and |
| 13 | limitations under the License. |
| 14 | |
| 15 | |
| 16 | From 0d5bed5d74a0f852a7c61db6f5f2c0a61c9fa84c Mon Sep 17 00:00:00 2001 |
| 17 | From: Ian Lewis <ianlewis@google.com> |
| 18 | Date: Thu, 16 Apr 2020 02:38:33 -0400 |
| 19 | Subject: [PATCH] Update to containerd 1.3.4 |
| 20 | |
| 21 | --- |
| 22 | cmd/gvisor-containerd-shim/main.go | 15 +-- |
| 23 | go.mod | 52 ++++---- |
| 24 | go.sum | 208 +++++++++++++++++++++++++++++ |
| 25 | pkg/v1/proc/deleted_state.go | 4 +- |
| 26 | pkg/v1/proc/exec.go | 8 +- |
| 27 | pkg/v1/proc/init.go | 21 +-- |
| 28 | pkg/v1/proc/init_state.go | 10 +- |
| 29 | pkg/v1/shim/platform.go | 4 +- |
| 30 | pkg/v1/shim/service.go | 13 +- |
| 31 | pkg/v2/service.go | 47 ++++--- |
| 32 | pkg/v2/service_linux.go | 4 +- |
| 33 | 11 files changed, 302 insertions(+), 84 deletions(-) |
| 34 | |
| 35 | diff --git a/cmd/gvisor-containerd-shim/main.go b/cmd/gvisor-containerd-shim/main.go |
| 36 | index ea26aa1..a9c6a9f 100644 |
| 37 | --- a/cmd/gvisor-containerd-shim/main.go |
| 38 | +++ b/cmd/gvisor-containerd-shim/main.go |
| 39 | @@ -36,9 +36,9 @@ import ( |
| 40 | |
| 41 | "github.com/containerd/containerd/events" |
| 42 | "github.com/containerd/containerd/namespaces" |
| 43 | - "github.com/containerd/containerd/runtime/v1/linux/proc" |
| 44 | - containerdshim "github.com/containerd/containerd/runtime/v1/shim" |
| 45 | + "github.com/containerd/containerd/pkg/process" |
| 46 | shimapi "github.com/containerd/containerd/runtime/v1/shim/v1" |
| 47 | + "github.com/containerd/containerd/sys/reaper" |
| 48 | "github.com/containerd/ttrpc" |
| 49 | "github.com/containerd/typeurl" |
| 50 | ptypes "github.com/gogo/protobuf/types" |
| 51 | @@ -73,7 +73,7 @@ func init() { |
| 52 | flag.StringVar(&workdirFlag, "workdir", "", "path used to storge large temporary data") |
| 53 | // Containerd default to runc, unless another runtime is explicitly specified. |
| 54 | // We keep the same default to make the default behavior consistent. |
| 55 | - flag.StringVar(&runtimeRootFlag, "runtime-root", proc.RuncRoot, "root directory for the runtime") |
| 56 | + flag.StringVar(&runtimeRootFlag, "runtime-root", process.RuncRoot, "root directory for the runtime") |
| 57 | // currently, the `containerd publish` utility is embedded in the daemon binary. |
| 58 | // The daemon invokes `containerd-shim -containerd-binary ...` with its own os.Executable() path. |
| 59 | flag.StringVar(&containerdBinaryFlag, "containerd-binary", "containerd", "path to containerd binary (used for `containerd publish`)") |
| 60 | @@ -229,8 +229,7 @@ func setupSignals() (chan os.Signal, error) { |
| 61 | signal.Notify(signals, unix.SIGTERM, unix.SIGINT, unix.SIGCHLD, unix.SIGPIPE) |
| 62 | // make sure runc is setup to use the monitor |
| 63 | // for waiting on processes |
| 64 | - // TODO(random-liu): Move shim/reaper.go to a separate package. |
| 65 | - runsc.Monitor = containerdshim.Default |
| 66 | + runsc.Monitor = reaper.Default |
| 67 | // set the shim as the subreaper for all orphaned processes created by the container |
| 68 | if err := system.SetSubreaper(1); err != nil { |
| 69 | return nil, err |
| 70 | @@ -251,7 +250,7 @@ func handleSignals(logger *logrus.Entry, signals chan os.Signal, server *ttrpc.S |
| 71 | case s := <-signals: |
| 72 | switch s { |
| 73 | case unix.SIGCHLD: |
| 74 | - if err := containerdshim.Reap(); err != nil { |
| 75 | + if err := reaper.Reap(); err != nil { |
| 76 | logger.WithError(err).Error("reap exit status") |
| 77 | } |
| 78 | case unix.SIGTERM, unix.SIGINT: |
| 79 | @@ -305,11 +304,11 @@ func (l *remoteEventsPublisher) Publish(ctx context.Context, topic string, event |
| 80 | } |
| 81 | cmd := exec.CommandContext(ctx, containerdBinaryFlag, "--address", l.address, "publish", "--topic", topic, "--namespace", ns) |
| 82 | cmd.Stdin = bytes.NewReader(data) |
| 83 | - c, err := containerdshim.Default.Start(cmd) |
| 84 | + c, err := reaper.Default.Start(cmd) |
| 85 | if err != nil { |
| 86 | return err |
| 87 | } |
| 88 | - status, err := containerdshim.Default.Wait(cmd, c) |
| 89 | + status, err := reaper.Default.Wait(cmd, c) |
| 90 | if err != nil { |
| 91 | return err |
| 92 | } |
| 93 | diff --git a/go.mod b/go.mod |
| 94 | index f15f829..5ae0d2e 100644 |
| 95 | --- a/go.mod |
| 96 | +++ b/go.mod |
| 97 | @@ -1,35 +1,37 @@ |
| 98 | module github.com/google/gvisor-containerd-shim |
| 99 | |
| 100 | -go 1.12 |
| 101 | +go 1.14 |
| 102 | |
| 103 | require ( |
| 104 | - github.com/BurntSushi/toml v0.3.0 |
| 105 | - github.com/Microsoft/go-winio v0.4.14 // indirect |
| 106 | - github.com/Microsoft/hcsshim v0.8.6 // indirect |
| 107 | - github.com/containerd/cgroups v0.0.0-20190328223300-4994991857f9 |
| 108 | + github.com/BurntSushi/toml v0.3.1 |
| 109 | + github.com/Microsoft/hcsshim v0.8.7 // indirect |
| 110 | + github.com/containerd/cgroups v0.0.0-20200407151229-7fc7a507c04c |
| 111 | github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1 |
| 112 | - github.com/containerd/containerd v0.0.0-20190510190154-d0319ec44af6 |
| 113 | - github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02 // indirect |
| 114 | + github.com/containerd/containerd v1.3.4 |
| 115 | + github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb // indirect |
| 116 | github.com/containerd/cri v0.0.0-20190308093238-8a0bd84b9a4c |
| 117 | - github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260 |
| 118 | + github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b |
| 119 | github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3 |
| 120 | - github.com/containerd/ttrpc v0.0.0-20190411181408-699c4e40d1e7 |
| 121 | - github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd |
| 122 | - github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b // indirect |
| 123 | - github.com/docker/go-units v0.3.1 // indirect |
| 124 | - github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55 // indirect |
| 125 | - github.com/gogo/protobuf v1.0.0 |
| 126 | - github.com/golang/protobuf v1.1.0 // indirect |
| 127 | - github.com/google/go-cmp v0.3.1 // indirect |
| 128 | - github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2 // indirect |
| 129 | + github.com/containerd/ttrpc v1.0.0 |
| 130 | + github.com/containerd/typeurl v1.0.0 |
| 131 | + github.com/docker/distribution v2.7.1+incompatible // indirect |
| 132 | + github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect |
| 133 | + github.com/gogo/googleapis v1.3.2 // indirect |
| 134 | + github.com/gogo/protobuf v1.3.1 |
| 135 | + github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect |
| 136 | + github.com/golang/protobuf v1.4.0 // indirect |
| 137 | + github.com/hashicorp/golang-lru v0.5.4 // indirect |
| 138 | + github.com/opencontainers/image-spec v1.0.1 // indirect |
| 139 | github.com/opencontainers/runc v1.0.0-rc8 |
| 140 | - github.com/opencontainers/runtime-spec v0.0.0-20180909173843-eba862dc2470 |
| 141 | - github.com/pkg/errors v0.8.1 |
| 142 | - github.com/sirupsen/logrus v1.4.1 |
| 143 | - golang.org/x/net v0.0.0-20170716174642-b3756b4b77d7 // indirect |
| 144 | - golang.org/x/sync v0.0.0-20190423024810-112230192c58 // indirect |
| 145 | - golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b |
| 146 | - google.golang.org/genproto v0.0.0-20170523043604-d80a6e20e776 // indirect |
| 147 | - google.golang.org/grpc v1.12.0 |
| 148 | + github.com/opencontainers/runtime-spec v1.0.2 |
| 149 | + github.com/pkg/errors v0.9.1 |
| 150 | + github.com/sirupsen/logrus v1.5.0 |
| 151 | + github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 // indirect |
| 152 | + go.opencensus.io v0.22.3 // indirect |
| 153 | + golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e // indirect |
| 154 | + golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect |
| 155 | + golang.org/x/sys v0.0.0-20200413165638-669c56c373c4 |
| 156 | + google.golang.org/genproto v0.0.0-20200413115906-b5235f65be36 // indirect |
| 157 | + google.golang.org/grpc v1.28.1 |
| 158 | gotest.tools v2.2.0+incompatible // indirect |
| 159 | ) |
| 160 | diff --git a/go.sum b/go.sum |
| 161 | index 93f2f1d..2fa699d 100644 |
| 162 | --- a/go.sum |
| 163 | +++ b/go.sum |
| 164 | @@ -1,67 +1,275 @@ |
| 165 | +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= |
| 166 | +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= |
| 167 | github.com/BurntSushi/toml v0.3.0 h1:e1/Ivsx3Z0FVTV0NSOv/aVgbUWyQuzj7DDnFblkRvsY= |
| 168 | github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= |
| 169 | +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= |
| 170 | +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= |
| 171 | github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= |
| 172 | github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= |
| 173 | +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 h1:ygIc8M6trr62pF5DucadTWGdEB4mEyvzi0e2nbcmcyA= |
| 174 | +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= |
| 175 | github.com/Microsoft/hcsshim v0.8.6 h1:ZfF0+zZeYdzMIVMZHKtDKJvLHj76XCuVae/jNkjj0IA= |
| 176 | github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= |
| 177 | +github.com/Microsoft/hcsshim v0.8.7 h1:ptnOoufxGSzauVTsdE+wMYnCWA301PdoN4xg5oRdZpg= |
| 178 | +github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= |
| 179 | +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= |
| 180 | +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= |
| 181 | +github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= |
| 182 | +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= |
| 183 | +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= |
| 184 | github.com/containerd/cgroups v0.0.0-20190328223300-4994991857f9 h1:LmZz7ns2YaWWJ6m17esVvIMNOfKcw+f/sCneqxKawB4= |
| 185 | github.com/containerd/cgroups v0.0.0-20190328223300-4994991857f9/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= |
| 186 | +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f h1:tSNMc+rJDfmYntojat8lljbt1mgKNpTxUZJsSzJ9Y1s= |
| 187 | +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= |
| 188 | +github.com/containerd/cgroups v0.0.0-20200407151229-7fc7a507c04c h1:BRbZO594sFDSfkqApcikeNRjePj+rJNoh4waZgefcEE= |
| 189 | +github.com/containerd/cgroups v0.0.0-20200407151229-7fc7a507c04c/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= |
| 190 | github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1 h1:uict5mhHFTzKLUCufdSLym7z/J0CbBJT59lYbP9wtbg= |
| 191 | github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= |
| 192 | github.com/containerd/containerd v0.0.0-20190510190154-d0319ec44af6 h1:BmZa1bGjKctYrIbyjbhZJlGvHceJASpdW5pIDSQcw1E= |
| 193 | github.com/containerd/containerd v0.0.0-20190510190154-d0319ec44af6/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= |
| 194 | +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= |
| 195 | +github.com/containerd/containerd v1.3.4 h1:3o0smo5SKY7H6AJCmJhsnCjR2/V2T8VmiHt7seN2/kI= |
| 196 | +github.com/containerd/containerd v1.3.4/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= |
| 197 | +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= |
| 198 | github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02 h1:tN9D97v5A5QuKdcKHKt+UMKrkQ5YXUnD8iM7IAAjEfI= |
| 199 | github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= |
| 200 | +github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb h1:nXPkFq8X1a9ycY3GYQpFNxHh3j2JgY7zDZfq2EXMIzk= |
| 201 | +github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= |
| 202 | github.com/containerd/cri v0.0.0-20190308093238-8a0bd84b9a4c h1:+bW7GQb2q32/Liy0ZiR6pkpRXdDHShUXRoWg8OGVWZs= |
| 203 | github.com/containerd/cri v0.0.0-20190308093238-8a0bd84b9a4c/go.mod h1:DavH5Qa8+6jOmeOMO3dhWoqksucZDe06LfuhBz/xPZs= |
| 204 | github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260 h1:XGyg7oTtD0DoRFhbpV6x1WfV0flKC4UxXU7ab1zC08U= |
| 205 | github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= |
| 206 | +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= |
| 207 | +github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b h1:qUtCegLdOUVfVJOw+KDg6eJyE1TGvLlkGEd1091kSSQ= |
| 208 | +github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= |
| 209 | github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3 h1:esQOJREg8nw8aXj6uCN5dfW5cKUBiEJ/+nni1Q/D/sw= |
| 210 | github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= |
| 211 | github.com/containerd/ttrpc v0.0.0-20190411181408-699c4e40d1e7 h1:SKDlsIhYxNE1LO0xwuOR+3QWj3zRibVQu5jWIMQmOfU= |
| 212 | github.com/containerd/ttrpc v0.0.0-20190411181408-699c4e40d1e7/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= |
| 213 | +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= |
| 214 | +github.com/containerd/ttrpc v1.0.0 h1:NY8Zk2i7TpkLxrkOASo+KTFq9iNCEmMH2/ZG9OuOw6k= |
| 215 | +github.com/containerd/ttrpc v1.0.0/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= |
| 216 | github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd h1:JNn81o/xG+8NEo3bC/vx9pbi/g2WI8mtP2/nXzu297Y= |
| 217 | github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= |
| 218 | +github.com/containerd/typeurl v1.0.0 h1:7LMH7LfEmpWeCkGcIputvd4P0Rnd0LrIv1Jk2s5oobs= |
| 219 | +github.com/containerd/typeurl v1.0.0/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= |
| 220 | github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b h1:+mtZ0WjVZwTX0RVrXMXDwuYVaNeHGvWBW1UwJeMR+2M= |
| 221 | github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= |
| 222 | +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= |
| 223 | +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= |
| 224 | +github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28= |
| 225 | +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= |
| 226 | +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= |
| 227 | +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= |
| 228 | +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |
| 229 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= |
| 230 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |
| 231 | +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= |
| 232 | +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= |
| 233 | +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= |
| 234 | +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= |
| 235 | github.com/docker/go-units v0.3.1 h1:QAFdsA6jLCnglbqE6mUsHuPcJlntY94DkxHf4deHKIU= |
| 236 | github.com/docker/go-units v0.3.1/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= |
| 237 | +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= |
| 238 | +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= |
| 239 | +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= |
| 240 | +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= |
| 241 | +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= |
| 242 | +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= |
| 243 | +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= |
| 244 | +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= |
| 245 | github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55 h1:oIgNYSrSUbNH5DJh6DMhU1PiOKOYIHNxrV3djLsLpEI= |
| 246 | github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= |
| 247 | +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e h1:BWhy2j3IXJhjCbC68FptL43tDKIq8FladmaTs3Xs7Z8= |
| 248 | +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= |
| 249 | +github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME= |
| 250 | +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= |
| 251 | +github.com/gogo/googleapis v1.3.2 h1:kX1es4djPJrsDhY7aZKJy7aZasdcB5oSOEphMjSB53c= |
| 252 | +github.com/gogo/googleapis v1.3.2/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= |
| 253 | github.com/gogo/protobuf v1.0.0 h1:2jyBKDKU/8v3v2xVR2PtiWQviFUyiaGk2rpfyFT8rTM= |
| 254 | github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= |
| 255 | +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= |
| 256 | +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= |
| 257 | +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= |
| 258 | +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= |
| 259 | +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= |
| 260 | +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= |
| 261 | +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= |
| 262 | +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= |
| 263 | +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= |
| 264 | github.com/golang/protobuf v1.1.0 h1:0iH4Ffd/meGoXqF2lSAhZHt8X+cPgkfn/cb6Cce5Vpc= |
| 265 | github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
| 266 | +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
| 267 | +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
| 268 | +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= |
| 269 | +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= |
| 270 | +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= |
| 271 | +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= |
| 272 | +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= |
| 273 | +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= |
| 274 | +github.com/golang/protobuf v1.4.0 h1:oOuy+ugB+P/kBdUnG5QaMXSIyJ1q38wWSojYCb3z5VQ= |
| 275 | +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= |
| 276 | +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= |
| 277 | +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= |
| 278 | github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= |
| 279 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= |
| 280 | +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= |
| 281 | +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce h1:prjrVgOk2Yg6w+PflHoszQNLTUh4kaByUcEWM/9uin4= |
| 282 | +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= |
| 283 | +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874 h1:cAv7ZbSmyb1wjn6T4TIiyFCkpcfgpbcNNC3bM2srLaI= |
| 284 | +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= |
| 285 | +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= |
| 286 | +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= |
| 287 | +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= |
| 288 | +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= |
| 289 | +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= |
| 290 | +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= |
| 291 | +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= |
| 292 | +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= |
| 293 | github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= |
| 294 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= |
| 295 | +github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= |
| 296 | +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= |
| 297 | +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= |
| 298 | +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= |
| 299 | +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= |
| 300 | github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2 h1:QhPf3A2AZW3tTGvHPg0TA+CR3oHbVLlXUhlghqISp1I= |
| 301 | github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= |
| 302 | +github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= |
| 303 | +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= |
| 304 | +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= |
| 305 | +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= |
| 306 | +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= |
| 307 | github.com/opencontainers/runc v1.0.0-rc8 h1:dDCFes8Hj1r/i5qnypONo5jdOme/8HWZC/aNDyhECt0= |
| 308 | github.com/opencontainers/runc v1.0.0-rc8/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= |
| 309 | github.com/opencontainers/runtime-spec v0.0.0-20180909173843-eba862dc2470 h1:dQgS6CgSB2mBQur4Cz7kaEtXNSw56ZlRb7ZsBT70hTA= |
| 310 | github.com/opencontainers/runtime-spec v0.0.0-20180909173843-eba862dc2470/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= |
| 311 | +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= |
| 312 | +github.com/opencontainers/runtime-spec v1.0.2 h1:UfAcuLBJB9Coz72x1hgl8O5RVzTdNiaglX6v2DM6FI0= |
| 313 | +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= |
| 314 | +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= |
| 315 | +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= |
| 316 | github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= |
| 317 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= |
| 318 | +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= |
| 319 | +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= |
| 320 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= |
| 321 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= |
| 322 | +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= |
| 323 | +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= |
| 324 | +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= |
| 325 | +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= |
| 326 | +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= |
| 327 | github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= |
| 328 | github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= |
| 329 | +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= |
| 330 | +github.com/sirupsen/logrus v1.5.0 h1:1N5EYkVAPEywqZRJd7cwnRtCb6xJx7NH3T3WUTF980Q= |
| 331 | +github.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo= |
| 332 | +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= |
| 333 | +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= |
| 334 | +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= |
| 335 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= |
| 336 | github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= |
| 337 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= |
| 338 | +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= |
| 339 | +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= |
| 340 | +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2 h1:b6uOv7YOFK0TYG7HtkIgExQo+2RdLuwRft63jn2HWj8= |
| 341 | +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= |
| 342 | +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= |
| 343 | +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= |
| 344 | +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= |
| 345 | +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= |
| 346 | +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= |
| 347 | +go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= |
| 348 | +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= |
| 349 | +go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8= |
| 350 | +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= |
| 351 | +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= |
| 352 | +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= |
| 353 | +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= |
| 354 | +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= |
| 355 | +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= |
| 356 | +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= |
| 357 | golang.org/x/net v0.0.0-20170716174642-b3756b4b77d7 h1:FCqk7JXVeupwwnGVopQCC0a0xRK0Rj7SL5AyjjWo4pk= |
| 358 | golang.org/x/net v0.0.0-20170716174642-b3756b4b77d7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
| 359 | +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
| 360 | +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
| 361 | +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
| 362 | +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
| 363 | +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= |
| 364 | +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= |
| 365 | +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= |
| 366 | +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= |
| 367 | +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= |
| 368 | +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= |
| 369 | +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
| 370 | +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
| 371 | +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
| 372 | +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
| 373 | +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= |
| 374 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
| 375 | +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= |
| 376 | +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= |
| 377 | +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
| 378 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
| 379 | +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
| 380 | +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= |
| 381 | +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
| 382 | +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
| 383 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA= |
| 384 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
| 385 | +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
| 386 | +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
| 387 | +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
| 388 | +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
| 389 | +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
| 390 | +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
| 391 | +golang.org/x/sys v0.0.0-20200413165638-669c56c373c4 h1:opSr2sbRXk5X5/givKrrKj9HXxFpW2sdCiP8MJSKLQY= |
| 392 | +golang.org/x/sys v0.0.0-20200413165638-669c56c373c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= |
| 393 | +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= |
| 394 | +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= |
| 395 | +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= |
| 396 | +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
| 397 | +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
| 398 | +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
| 399 | +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= |
| 400 | +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= |
| 401 | +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= |
| 402 | +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= |
| 403 | +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= |
| 404 | +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= |
| 405 | +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= |
| 406 | google.golang.org/genproto v0.0.0-20170523043604-d80a6e20e776 h1:wVJP1pATLVPNxCz4R2mTO6HUJgfGE0PmIu2E10RuhCw= |
| 407 | google.golang.org/genproto v0.0.0-20170523043604-d80a6e20e776/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= |
| 408 | +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= |
| 409 | +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= |
| 410 | +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= |
| 411 | +google.golang.org/genproto v0.0.0-20200413115906-b5235f65be36 h1:j7CmVRD4Kec0+f8VuBAc2Ak2MFfXm5Q2/RxuJLL+76E= |
| 412 | +google.golang.org/genproto v0.0.0-20200413115906-b5235f65be36/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= |
| 413 | google.golang.org/grpc v1.12.0 h1:Mm8atZtkT+P6R43n/dqNDWkPPu5BwRVu/1rJnJCeZH8= |
| 414 | google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= |
| 415 | +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= |
| 416 | +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= |
| 417 | +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= |
| 418 | +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= |
| 419 | +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= |
| 420 | +google.golang.org/grpc v1.28.1 h1:C1QC6KzgSiLyBabDi87BbjaGreoRgGUF5nOyvfrAZ1k= |
| 421 | +google.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= |
| 422 | +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= |
| 423 | +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= |
| 424 | +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= |
| 425 | +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= |
| 426 | +google.golang.org/protobuf v1.21.0 h1:qdOKuR/EIArgaWNjetjgTzgVTAZ+S/WXVrq9HW9zimw= |
| 427 | +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= |
| 428 | +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= |
| 429 | +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
| 430 | +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= |
| 431 | +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= |
| 432 | +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= |
| 433 | +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
| 434 | +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= |
| 435 | gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= |
| 436 | gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= |
| 437 | +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= |
| 438 | +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= |
| 439 | +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= |
| 440 | diff --git a/pkg/v1/proc/deleted_state.go b/pkg/v1/proc/deleted_state.go |
| 441 | index 95b4406..941598b 100644 |
| 442 | --- a/pkg/v1/proc/deleted_state.go |
| 443 | +++ b/pkg/v1/proc/deleted_state.go |
| 444 | @@ -22,7 +22,7 @@ import ( |
| 445 | |
| 446 | "github.com/containerd/console" |
| 447 | "github.com/containerd/containerd/errdefs" |
| 448 | - "github.com/containerd/containerd/runtime/proc" |
| 449 | + "github.com/containerd/containerd/pkg/process" |
| 450 | "github.com/pkg/errors" |
| 451 | ) |
| 452 | |
| 453 | @@ -51,6 +51,6 @@ func (s *deletedState) SetExited(status int) { |
| 454 | // no op |
| 455 | } |
| 456 | |
| 457 | -func (s *deletedState) Exec(ctx context.Context, path string, r *ExecConfig) (proc.Process, error) { |
| 458 | +func (s *deletedState) Exec(ctx context.Context, path string, r *ExecConfig) (process.Process, error) { |
| 459 | return nil, errors.Errorf("cannot exec in a deleted state") |
| 460 | } |
| 461 | diff --git a/pkg/v1/proc/exec.go b/pkg/v1/proc/exec.go |
| 462 | index f02b73b..cbc0819 100644 |
| 463 | --- a/pkg/v1/proc/exec.go |
| 464 | +++ b/pkg/v1/proc/exec.go |
| 465 | @@ -29,7 +29,7 @@ import ( |
| 466 | |
| 467 | "github.com/containerd/console" |
| 468 | "github.com/containerd/containerd/errdefs" |
| 469 | - "github.com/containerd/containerd/runtime/proc" |
| 470 | + "github.com/containerd/containerd/pkg/stdio" |
| 471 | "github.com/containerd/fifo" |
| 472 | runc "github.com/containerd/go-runc" |
| 473 | specs "github.com/opencontainers/runtime-spec/specs-go" |
| 474 | @@ -54,7 +54,7 @@ type execProcess struct { |
| 475 | internalPid int |
| 476 | closers []io.Closer |
| 477 | stdin io.Closer |
| 478 | - stdio proc.Stdio |
| 479 | + stdio stdio.Stdio |
| 480 | path string |
| 481 | spec specs.Process |
| 482 | |
| 483 | @@ -165,7 +165,7 @@ func (e *execProcess) Stdin() io.Closer { |
| 484 | return e.stdin |
| 485 | } |
| 486 | |
| 487 | -func (e *execProcess) Stdio() proc.Stdio { |
| 488 | +func (e *execProcess) Stdio() stdio.Stdio { |
| 489 | return e.stdio |
| 490 | } |
| 491 | |
| 492 | @@ -232,7 +232,7 @@ func (e *execProcess) start(ctx context.Context) (err error) { |
| 493 | if err != nil { |
| 494 | return errors.Wrap(err, "failed to retrieve console master") |
| 495 | } |
| 496 | - if e.console, err = e.parent.Platform.CopyConsole(ctx, console, e.stdio.Stdin, e.stdio.Stdout, e.stdio.Stderr, &e.wg, ©WaitGroup); err != nil { |
| 497 | + if e.console, err = e.parent.Platform.CopyConsole(ctx, console, e.stdio.Stdin, e.stdio.Stdout, e.stdio.Stderr, &e.wg); err != nil { |
| 498 | return errors.Wrap(err, "failed to start console copy") |
| 499 | } |
| 500 | } else if !e.stdio.IsNull() { |
| 501 | diff --git a/pkg/v1/proc/init.go b/pkg/v1/proc/init.go |
| 502 | index 5dbb1da..138880b 100644 |
| 503 | --- a/pkg/v1/proc/init.go |
| 504 | +++ b/pkg/v1/proc/init.go |
| 505 | @@ -31,7 +31,8 @@ import ( |
| 506 | "github.com/containerd/containerd/errdefs" |
| 507 | "github.com/containerd/containerd/log" |
| 508 | "github.com/containerd/containerd/mount" |
| 509 | - "github.com/containerd/containerd/runtime/proc" |
| 510 | + "github.com/containerd/containerd/pkg/process" |
| 511 | + "github.com/containerd/containerd/pkg/stdio" |
| 512 | "github.com/containerd/fifo" |
| 513 | runc "github.com/containerd/go-runc" |
| 514 | specs "github.com/opencontainers/runtime-spec/specs-go" |
| 515 | @@ -61,7 +62,7 @@ type Init struct { |
| 516 | id string |
| 517 | Bundle string |
| 518 | console console.Console |
| 519 | - Platform proc.Platform |
| 520 | + Platform stdio.Platform |
| 521 | io runc.IO |
| 522 | runtime *runsc.Runsc |
| 523 | status int |
| 524 | @@ -69,7 +70,7 @@ type Init struct { |
| 525 | pid int |
| 526 | closers []io.Closer |
| 527 | stdin io.Closer |
| 528 | - stdio proc.Stdio |
| 529 | + stdio stdio.Stdio |
| 530 | Rootfs string |
| 531 | IoUID int |
| 532 | IoGID int |
| 533 | @@ -94,7 +95,7 @@ func NewRunsc(root, path, namespace, runtime string, config map[string]string) * |
| 534 | } |
| 535 | |
| 536 | // New returns a new init process |
| 537 | -func New(id string, runtime *runsc.Runsc, stdio proc.Stdio) *Init { |
| 538 | +func New(id string, runtime *runsc.Runsc, stdio stdio.Stdio) *Init { |
| 539 | p := &Init{ |
| 540 | id: id, |
| 541 | runtime: runtime, |
| 542 | @@ -154,7 +155,7 @@ func (p *Init) Create(ctx context.Context, r *CreateConfig) (err error) { |
| 543 | if err != nil { |
| 544 | return errors.Wrap(err, "failed to retrieve console master") |
| 545 | } |
| 546 | - console, err = p.Platform.CopyConsole(ctx, console, r.Stdin, r.Stdout, r.Stderr, &p.wg, ©WaitGroup) |
| 547 | + console, err = p.Platform.CopyConsole(ctx, console, r.Stdin, r.Stdout, r.Stderr, &p.wg) |
| 548 | if err != nil { |
| 549 | return errors.Wrap(err, "failed to start console copy") |
| 550 | } |
| 551 | @@ -393,7 +394,7 @@ func (p *Init) Runtime() *runsc.Runsc { |
| 552 | } |
| 553 | |
| 554 | // Exec returns a new child process |
| 555 | -func (p *Init) Exec(ctx context.Context, path string, r *ExecConfig) (proc.Process, error) { |
| 556 | +func (p *Init) Exec(ctx context.Context, path string, r *ExecConfig) (process.Process, error) { |
| 557 | p.mu.Lock() |
| 558 | defer p.mu.Unlock() |
| 559 | |
| 560 | @@ -401,7 +402,7 @@ func (p *Init) Exec(ctx context.Context, path string, r *ExecConfig) (proc.Proce |
| 561 | } |
| 562 | |
| 563 | // exec returns a new exec'd process |
| 564 | -func (p *Init) exec(ctx context.Context, path string, r *ExecConfig) (proc.Process, error) { |
| 565 | +func (p *Init) exec(ctx context.Context, path string, r *ExecConfig) (process.Process, error) { |
| 566 | // process exec request |
| 567 | var spec specs.Process |
| 568 | if err := json.Unmarshal(r.Spec.Value, &spec); err != nil { |
| 569 | @@ -414,7 +415,7 @@ func (p *Init) exec(ctx context.Context, path string, r *ExecConfig) (proc.Proce |
| 570 | path: path, |
| 571 | parent: p, |
| 572 | spec: spec, |
| 573 | - stdio: proc.Stdio{ |
| 574 | + stdio: stdio.Stdio{ |
| 575 | Stdin: r.Stdin, |
| 576 | Stdout: r.Stdout, |
| 577 | Stderr: r.Stderr, |
| 578 | @@ -427,7 +428,7 @@ func (p *Init) exec(ctx context.Context, path string, r *ExecConfig) (proc.Proce |
| 579 | } |
| 580 | |
| 581 | // Stdio of the process |
| 582 | -func (p *Init) Stdio() proc.Stdio { |
| 583 | +func (p *Init) Stdio() stdio.Stdio { |
| 584 | return p.stdio |
| 585 | } |
| 586 | |
| 587 | @@ -455,7 +456,7 @@ func (p *Init) convertStatus(status string) string { |
| 588 | return status |
| 589 | } |
| 590 | |
| 591 | -func withConditionalIO(c proc.Stdio) runc.IOOpt { |
| 592 | +func withConditionalIO(c stdio.Stdio) runc.IOOpt { |
| 593 | return func(o *runc.IOOption) { |
| 594 | o.OpenStdin = c.Stdin != "" |
| 595 | o.OpenStdout = c.Stdout != "" |
| 596 | diff --git a/pkg/v1/proc/init_state.go b/pkg/v1/proc/init_state.go |
| 597 | index f56f6fe..22cca4a 100644 |
| 598 | --- a/pkg/v1/proc/init_state.go |
| 599 | +++ b/pkg/v1/proc/init_state.go |
| 600 | @@ -22,7 +22,7 @@ import ( |
| 601 | |
| 602 | "github.com/containerd/console" |
| 603 | "github.com/containerd/containerd/errdefs" |
| 604 | - "github.com/containerd/containerd/runtime/proc" |
| 605 | + "github.com/containerd/containerd/pkg/process" |
| 606 | "github.com/pkg/errors" |
| 607 | ) |
| 608 | |
| 609 | @@ -30,7 +30,7 @@ type initState interface { |
| 610 | Resize(console.WinSize) error |
| 611 | Start(context.Context) error |
| 612 | Delete(context.Context) error |
| 613 | - Exec(context.Context, string, *ExecConfig) (proc.Process, error) |
| 614 | + Exec(context.Context, string, *ExecConfig) (process.Process, error) |
| 615 | Kill(context.Context, uint32, bool) error |
| 616 | SetExited(int) |
| 617 | } |
| 618 | @@ -96,7 +96,7 @@ func (s *createdState) SetExited(status int) { |
| 619 | } |
| 620 | } |
| 621 | |
| 622 | -func (s *createdState) Exec(ctx context.Context, path string, r *ExecConfig) (proc.Process, error) { |
| 623 | +func (s *createdState) Exec(ctx context.Context, path string, r *ExecConfig) (process.Process, error) { |
| 624 | return s.p.exec(ctx, path, r) |
| 625 | } |
| 626 | |
| 627 | @@ -138,7 +138,7 @@ func (s *runningState) SetExited(status int) { |
| 628 | } |
| 629 | } |
| 630 | |
| 631 | -func (s *runningState) Exec(ctx context.Context, path string, r *ExecConfig) (proc.Process, error) { |
| 632 | +func (s *runningState) Exec(ctx context.Context, path string, r *ExecConfig) (process.Process, error) { |
| 633 | return s.p.exec(ctx, path, r) |
| 634 | } |
| 635 | |
| 636 | @@ -179,6 +179,6 @@ func (s *stoppedState) SetExited(status int) { |
| 637 | // no op |
| 638 | } |
| 639 | |
| 640 | -func (s *stoppedState) Exec(ctx context.Context, path string, r *ExecConfig) (proc.Process, error) { |
| 641 | +func (s *stoppedState) Exec(ctx context.Context, path string, r *ExecConfig) (process.Process, error) { |
| 642 | return nil, errors.Errorf("cannot exec in a stopped state") |
| 643 | } |
| 644 | diff --git a/pkg/v1/shim/platform.go b/pkg/v1/shim/platform.go |
| 645 | index 10c5495..fa3dd97 100644 |
| 646 | --- a/pkg/v1/shim/platform.go |
| 647 | +++ b/pkg/v1/shim/platform.go |
| 648 | @@ -32,7 +32,8 @@ type linuxPlatform struct { |
| 649 | epoller *console.Epoller |
| 650 | } |
| 651 | |
| 652 | -func (p *linuxPlatform) CopyConsole(ctx context.Context, console console.Console, stdin, stdout, stderr string, wg, cwg *sync.WaitGroup) (console.Console, error) { |
| 653 | +func (p *linuxPlatform) CopyConsole(ctx context.Context, console console.Console, stdin, stdout, stderr string, wg *sync.WaitGroup) (console.Console, error) { |
| 654 | + var cwg sync.WaitGroup |
| 655 | if p.epoller == nil { |
| 656 | return nil, errors.New("uninitialized epoller") |
| 657 | } |
| 658 | @@ -76,6 +77,7 @@ func (p *linuxPlatform) CopyConsole(ctx context.Context, console console.Console |
| 659 | outw.Close() |
| 660 | wg.Done() |
| 661 | }() |
| 662 | + cwg.Wait() |
| 663 | return epollConsole, nil |
| 664 | } |
| 665 | |
| 666 | diff --git a/pkg/v1/shim/service.go b/pkg/v1/shim/service.go |
| 667 | index e06a556..270d190 100644 |
| 668 | --- a/pkg/v1/shim/service.go |
| 669 | +++ b/pkg/v1/shim/service.go |
| 670 | @@ -32,11 +32,12 @@ import ( |
| 671 | "github.com/containerd/containerd/log" |
| 672 | "github.com/containerd/containerd/mount" |
| 673 | "github.com/containerd/containerd/namespaces" |
| 674 | + rproc "github.com/containerd/containerd/pkg/process" |
| 675 | + "github.com/containerd/containerd/pkg/stdio" |
| 676 | "github.com/containerd/containerd/runtime" |
| 677 | "github.com/containerd/containerd/runtime/linux/runctypes" |
| 678 | - rproc "github.com/containerd/containerd/runtime/proc" |
| 679 | - "github.com/containerd/containerd/runtime/v1/shim" |
| 680 | shimapi "github.com/containerd/containerd/runtime/v1/shim/v1" |
| 681 | + "github.com/containerd/containerd/sys/reaper" |
| 682 | "github.com/containerd/typeurl" |
| 683 | ptypes "github.com/gogo/protobuf/types" |
| 684 | "github.com/pkg/errors" |
| 685 | @@ -102,7 +103,7 @@ type Service struct { |
| 686 | context context.Context |
| 687 | processes map[string]rproc.Process |
| 688 | events chan interface{} |
| 689 | - platform rproc.Platform |
| 690 | + platform stdio.Platform |
| 691 | ec chan proc.Exit |
| 692 | |
| 693 | // Filled by Create() |
| 694 | @@ -541,7 +542,7 @@ func getTopic(ctx context.Context, e interface{}) string { |
| 695 | return runtime.TaskUnknownTopic |
| 696 | } |
| 697 | |
| 698 | -func newInit(ctx context.Context, path, workDir, runtimeRoot, namespace string, config map[string]string, platform rproc.Platform, r *proc.CreateConfig) (*proc.Init, error) { |
| 699 | +func newInit(ctx context.Context, path, workDir, runtimeRoot, namespace string, config map[string]string, platform stdio.Platform, r *proc.CreateConfig) (*proc.Init, error) { |
| 700 | var options runctypes.CreateOptions |
| 701 | if r.Options != nil { |
| 702 | v, err := typeurl.UnmarshalAny(r.Options) |
| 703 | @@ -562,7 +563,7 @@ func newInit(ctx context.Context, path, workDir, runtimeRoot, namespace string, |
| 704 | runsc.FormatLogPath(r.ID, config) |
| 705 | rootfs := filepath.Join(path, "rootfs") |
| 706 | runtime := proc.NewRunsc(runtimeRoot, path, namespace, r.Runtime, config) |
| 707 | - p := proc.New(r.ID, runtime, rproc.Stdio{ |
| 708 | + p := proc.New(r.ID, runtime, stdio.Stdio{ |
| 709 | Stdin: r.Stdin, |
| 710 | Stdout: r.Stdout, |
| 711 | Stderr: r.Stderr, |
| 712 | @@ -576,6 +577,6 @@ func newInit(ctx context.Context, path, workDir, runtimeRoot, namespace string, |
| 713 | p.IoGID = int(options.IoGid) |
| 714 | p.Sandbox = utils.IsSandbox(spec) |
| 715 | p.UserLog = utils.UserLogPath(spec) |
| 716 | - p.Monitor = shim.Default |
| 717 | + p.Monitor = reaper.Default |
| 718 | return p, nil |
| 719 | } |
| 720 | diff --git a/pkg/v2/service.go b/pkg/v2/service.go |
| 721 | index 3f0a236..c1df4b8 100644 |
| 722 | --- a/pkg/v2/service.go |
| 723 | +++ b/pkg/v2/service.go |
| 724 | @@ -30,20 +30,21 @@ import ( |
| 725 | "time" |
| 726 | |
| 727 | "github.com/BurntSushi/toml" |
| 728 | - "github.com/containerd/cgroups" |
| 729 | + cgroups "github.com/containerd/cgroups/stats/v1" |
| 730 | "github.com/containerd/console" |
| 731 | eventstypes "github.com/containerd/containerd/api/events" |
| 732 | "github.com/containerd/containerd/api/types/task" |
| 733 | "github.com/containerd/containerd/errdefs" |
| 734 | - "github.com/containerd/containerd/events" |
| 735 | "github.com/containerd/containerd/log" |
| 736 | "github.com/containerd/containerd/mount" |
| 737 | "github.com/containerd/containerd/namespaces" |
| 738 | + "github.com/containerd/containerd/pkg/process" |
| 739 | + "github.com/containerd/containerd/pkg/stdio" |
| 740 | "github.com/containerd/containerd/runtime" |
| 741 | "github.com/containerd/containerd/runtime/linux/runctypes" |
| 742 | - rproc "github.com/containerd/containerd/runtime/proc" |
| 743 | "github.com/containerd/containerd/runtime/v2/shim" |
| 744 | taskAPI "github.com/containerd/containerd/runtime/v2/task" |
| 745 | + "github.com/containerd/containerd/sys/reaper" |
| 746 | runtimeoptions "github.com/containerd/cri/pkg/api/runtimeoptions/v1" |
| 747 | "github.com/containerd/typeurl" |
| 748 | ptypes "github.com/gogo/protobuf/types" |
| 749 | @@ -74,23 +75,22 @@ var _ = (taskAPI.TaskService)(&service{}) |
| 750 | const configFile = "config.toml" |
| 751 | |
| 752 | // New returns a new shim service that can be used via GRPC |
| 753 | -func New(ctx context.Context, id string, publisher events.Publisher) (shim.Shim, error) { |
| 754 | - ctx, cancel := context.WithCancel(ctx) |
| 755 | +func New(ctx context.Context, id string, publisher shim.Publisher, shutdown func()) (shim.Shim, error) { |
| 756 | s := &service{ |
| 757 | id: id, |
| 758 | context: ctx, |
| 759 | - processes: make(map[string]rproc.Process), |
| 760 | + processes: make(map[string]process.Process), |
| 761 | events: make(chan interface{}, 128), |
| 762 | ec: proc.ExitCh, |
| 763 | - cancel: cancel, |
| 764 | + cancel: shutdown, |
| 765 | } |
| 766 | go s.processExits() |
| 767 | - runsc.Monitor = shim.Default |
| 768 | + runsc.Monitor = reaper.Default |
| 769 | if err := s.initPlatform(); err != nil { |
| 770 | - cancel() |
| 771 | + shutdown() |
| 772 | return nil, errors.Wrap(err, "failed to initialized platform behavior") |
| 773 | } |
| 774 | - go s.forward(publisher) |
| 775 | + go s.forward(ctx, publisher) |
| 776 | return s, nil |
| 777 | } |
| 778 | |
| 779 | @@ -99,10 +99,10 @@ type service struct { |
| 780 | mu sync.Mutex |
| 781 | |
| 782 | context context.Context |
| 783 | - task rproc.Process |
| 784 | - processes map[string]rproc.Process |
| 785 | + task process.Process |
| 786 | + processes map[string]process.Process |
| 787 | events chan interface{} |
| 788 | - platform rproc.Platform |
| 789 | + platform stdio.Platform |
| 790 | ec chan proc.Exit |
| 791 | |
| 792 | id string |
| 793 | @@ -137,7 +137,7 @@ func newCommand(ctx context.Context, containerdBinary, containerdAddress string) |
| 794 | return cmd, nil |
| 795 | } |
| 796 | |
| 797 | -func (s *service) StartShim(ctx context.Context, id, containerdBinary, containerdAddress string) (string, error) { |
| 798 | +func (s *service) StartShim(ctx context.Context, id, containerdBinary, containerdAddress, containerdTTRPCAddress string) (string, error) { |
| 799 | cmd, err := newCommand(ctx, containerdBinary, containerdAddress) |
| 800 | if err != nil { |
| 801 | return "", err |
| 802 | @@ -560,7 +560,7 @@ func (s *service) Connect(ctx context.Context, r *taskAPI.ConnectRequest) (*task |
| 803 | |
| 804 | func (s *service) Shutdown(ctx context.Context, r *taskAPI.ShutdownRequest) (*ptypes.Empty, error) { |
| 805 | s.cancel() |
| 806 | - os.Exit(0) |
| 807 | + close(s.events) |
| 808 | return empty, nil |
| 809 | } |
| 810 | |
| 811 | @@ -697,7 +697,7 @@ func (s *service) checkProcesses(e proc.Exit) { |
| 812 | } |
| 813 | } |
| 814 | |
| 815 | -func (s *service) allProcesses() (o []rproc.Process) { |
| 816 | +func (s *service) allProcesses() (o []process.Process) { |
| 817 | s.mu.Lock() |
| 818 | defer s.mu.Unlock() |
| 819 | for _, p := range s.processes { |
| 820 | @@ -727,18 +727,21 @@ func (s *service) getContainerPids(ctx context.Context, id string) ([]uint32, er |
| 821 | return pids, nil |
| 822 | } |
| 823 | |
| 824 | -func (s *service) forward(publisher events.Publisher) { |
| 825 | +func (s *service) forward(ctx context.Context, publisher shim.Publisher) { |
| 826 | + ns, _ := namespaces.Namespace(ctx) |
| 827 | + ctx = namespaces.WithNamespace(context.Background(), ns) |
| 828 | for e := range s.events { |
| 829 | - ctx, cancel := context.WithTimeout(s.context, 5*time.Second) |
| 830 | + ctx, cancel := context.WithTimeout(ctx, 5*time.Second) |
| 831 | err := publisher.Publish(ctx, getTopic(e), e) |
| 832 | cancel() |
| 833 | if err != nil { |
| 834 | logrus.WithError(err).Error("post event") |
| 835 | } |
| 836 | } |
| 837 | + publisher.Close() |
| 838 | } |
| 839 | |
| 840 | -func (s *service) getProcess(execID string) (rproc.Process, error) { |
| 841 | +func (s *service) getProcess(execID string) (process.Process, error) { |
| 842 | s.mu.Lock() |
| 843 | defer s.mu.Unlock() |
| 844 | if execID == "" { |
| 845 | @@ -773,7 +776,7 @@ func getTopic(e interface{}) string { |
| 846 | return runtime.TaskUnknownTopic |
| 847 | } |
| 848 | |
| 849 | -func newInit(ctx context.Context, path, workDir, namespace string, platform rproc.Platform, r *proc.CreateConfig, options *options.Options, rootfs string) (*proc.Init, error) { |
| 850 | +func newInit(ctx context.Context, path, workDir, namespace string, platform stdio.Platform, r *proc.CreateConfig, options *options.Options, rootfs string) (*proc.Init, error) { |
| 851 | spec, err := utils.ReadSpec(r.Bundle) |
| 852 | if err != nil { |
| 853 | return nil, errors.Wrap(err, "read oci spec") |
| 854 | @@ -783,7 +786,7 @@ func newInit(ctx context.Context, path, workDir, namespace string, platform rpro |
| 855 | } |
| 856 | runsc.FormatLogPath(r.ID, options.RunscConfig) |
| 857 | runtime := proc.NewRunsc(options.Root, path, namespace, options.BinaryName, options.RunscConfig) |
| 858 | - p := proc.New(r.ID, runtime, rproc.Stdio{ |
| 859 | + p := proc.New(r.ID, runtime, stdio.Stdio{ |
| 860 | Stdin: r.Stdin, |
| 861 | Stdout: r.Stdout, |
| 862 | Stderr: r.Stderr, |
| 863 | @@ -797,6 +800,6 @@ func newInit(ctx context.Context, path, workDir, namespace string, platform rpro |
| 864 | p.IoGID = int(options.IoGid) |
| 865 | p.Sandbox = utils.IsSandbox(spec) |
| 866 | p.UserLog = utils.UserLogPath(spec) |
| 867 | - p.Monitor = shim.Default |
| 868 | + p.Monitor = reaper.Default |
| 869 | return p, nil |
| 870 | } |
| 871 | diff --git a/pkg/v2/service_linux.go b/pkg/v2/service_linux.go |
| 872 | index cbd4315..09d9786 100644 |
| 873 | --- a/pkg/v2/service_linux.go |
| 874 | +++ b/pkg/v2/service_linux.go |
| 875 | @@ -31,7 +31,8 @@ type linuxPlatform struct { |
| 876 | epoller *console.Epoller |
| 877 | } |
| 878 | |
| 879 | -func (p *linuxPlatform) CopyConsole(ctx context.Context, console console.Console, stdin, stdout, stderr string, wg, cwg *sync.WaitGroup) (console.Console, error) { |
| 880 | +func (p *linuxPlatform) CopyConsole(ctx context.Context, console console.Console, stdin, stdout, stderr string, wg *sync.WaitGroup) (console.Console, error) { |
| 881 | + var cwg sync.WaitGroup |
| 882 | if p.epoller == nil { |
| 883 | return nil, errors.New("uninitialized epoller") |
| 884 | } |
| 885 | @@ -75,6 +76,7 @@ func (p *linuxPlatform) CopyConsole(ctx context.Context, console console.Console |
| 886 | outw.Close() |
| 887 | wg.Done() |
| 888 | }() |
| 889 | + cwg.Wait() |
| 890 | return epollConsole, nil |
| 891 | } |
| 892 | |
| 893 | -- |
| 894 | 2.25.1 |
| 895 | |