Browse code

Update containerd to aa5e000c963756778ab3ebd1a12c6

This includes a patch on top of containerd 1.2.1 to handle fifo
timeouts.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Michael Crosby authored on 2018/12/15 05:41:41
Showing 4 changed files
... ...
@@ -4,7 +4,7 @@
4 4
 # containerd is also pinned in vendor.conf. When updating the binary
5 5
 # version you may also need to update the vendor version to pick up bug
6 6
 # fixes or new APIs.
7
-CONTAINERD_COMMIT=9b32062dc1f5a7c2564315c269b5059754f12b9d # v1.2.1
7
+CONTAINERD_COMMIT=aa5e000c963756778ab3ebd1a12c67449c503a34 # v1.2.1+
8 8
 
9 9
 install_containerd() {
10 10
 	echo "Install containerd version $CONTAINERD_COMMIT"
... ...
@@ -118,7 +118,7 @@ github.com/googleapis/gax-go v2.0.0
118 118
 google.golang.org/genproto 694d95ba50e67b2e363f3483057db5d4910c18f9
119 119
 
120 120
 # containerd
121
-github.com/containerd/containerd 9b32062dc1f5a7c2564315c269b5059754f12b9d # v1.2.1
121
+github.com/containerd/containerd aa5e000c963756778ab3ebd1a12c67449c503a34 # v1.2.1+
122 122
 github.com/containerd/fifo 3d5202aec260678c48179c56f40e6f38a095738c
123 123
 github.com/containerd/continuity 004b46473808b3e7a4a3049c20e4376c91eb966d
124 124
 github.com/containerd/cgroups 5e610833b72089b37d0e615de9a92dfc043757c2
... ...
@@ -209,22 +209,27 @@ func (e *execProcess) start(ctx context.Context) (err error) {
209 209
 		e.stdin = sc
210 210
 	}
211 211
 	var copyWaitGroup sync.WaitGroup
212
+	ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
212 213
 	if socket != nil {
213 214
 		console, err := socket.ReceiveMaster()
214 215
 		if err != nil {
216
+			cancel()
215 217
 			return errors.Wrap(err, "failed to retrieve console master")
216 218
 		}
217 219
 		if e.console, err = e.parent.Platform.CopyConsole(ctx, console, e.stdio.Stdin, e.stdio.Stdout, e.stdio.Stderr, &e.wg, &copyWaitGroup); err != nil {
220
+			cancel()
218 221
 			return errors.Wrap(err, "failed to start console copy")
219 222
 		}
220 223
 	} else if !e.stdio.IsNull() {
221 224
 		if err := copyPipes(ctx, e.io, e.stdio.Stdin, e.stdio.Stdout, e.stdio.Stderr, &e.wg, &copyWaitGroup); err != nil {
225
+			cancel()
222 226
 			return errors.Wrap(err, "failed to start io pipe copy")
223 227
 		}
224 228
 	}
225 229
 	copyWaitGroup.Wait()
226 230
 	pid, err := runc.ReadPidFile(opts.PidFile)
227 231
 	if err != nil {
232
+		cancel()
228 233
 		return errors.Wrap(err, "failed to retrieve OCI runtime exec pid")
229 234
 	}
230 235
 	e.pid = pid
... ...
@@ -168,18 +168,22 @@ func (p *Init) Create(ctx context.Context, r *CreateConfig) error {
168 168
 		p.closers = append(p.closers, sc)
169 169
 	}
170 170
 	var copyWaitGroup sync.WaitGroup
171
+	ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
171 172
 	if socket != nil {
172 173
 		console, err := socket.ReceiveMaster()
173 174
 		if err != nil {
175
+			cancel()
174 176
 			return errors.Wrap(err, "failed to retrieve console master")
175 177
 		}
176 178
 		console, err = p.Platform.CopyConsole(ctx, console, r.Stdin, r.Stdout, r.Stderr, &p.wg, &copyWaitGroup)
177 179
 		if err != nil {
180
+			cancel()
178 181
 			return errors.Wrap(err, "failed to start console copy")
179 182
 		}
180 183
 		p.console = console
181 184
 	} else if !hasNoIO(r) {
182 185
 		if err := copyPipes(ctx, p.io, r.Stdin, r.Stdout, r.Stderr, &p.wg, &copyWaitGroup); err != nil {
186
+			cancel()
183 187
 			return errors.Wrap(err, "failed to start io pipe copy")
184 188
 		}
185 189
 	}
... ...
@@ -187,6 +191,7 @@ func (p *Init) Create(ctx context.Context, r *CreateConfig) error {
187 187
 	copyWaitGroup.Wait()
188 188
 	pid, err := runc.ReadPidFile(pidFile)
189 189
 	if err != nil {
190
+		cancel()
190 191
 		return errors.Wrap(err, "failed to retrieve OCI runtime container pid")
191 192
 	}
192 193
 	p.pid = pid