Skip to content

Commit a000934

Browse files
committed
Update containerd daemon
Signed-off-by: Derek McGowan <[email protected]>
1 parent 52ed3e0 commit a000934

3 files changed

Lines changed: 21 additions & 5 deletions

File tree

hack/dockerfile/install/containerd.installer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# containerd is also pinned in vendor.conf. When updating the binary
55
# version you may also need to update the vendor version to pick up bug
66
# fixes or new APIs.
7-
CONTAINERD_COMMIT=773c489c9c1b21a6d78b5c538cd395416ec50f88 # v1.0.3
7+
CONTAINERD_COMMIT=395068d2b7256518259816ae19e45824b15da071 # v1.1.1-rc.0
88

99
install_containerd() {
1010
echo "Install containerd version $CONTAINERD_COMMIT"

libcontainerd/client_daemon.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ func (c *client) Start(ctx context.Context, id, checkpointDir string, withStdin
294294
t, err = ctr.ctr.NewTask(ctx,
295295
func(id string) (cio.IO, error) {
296296
fifos := newFIFOSet(ctr.bundleDir, InitProcessName, withStdin, spec.Process.Terminal)
297-
rio, err = c.createIO(fifos, id, InitProcessName, stdinCloseSync, attachStdio)
297+
298+
rio, err = c.createIO(fifos, id, InitProcessName, stdinCloseSync, attachStdio, spec.Process.Terminal)
298299
return rio, err
299300
},
300301
func(_ context.Context, _ *containerd.Client, info *containerd.TaskInfo) error {
@@ -365,7 +366,7 @@ func (c *client) Exec(ctx context.Context, containerID, processID string, spec *
365366
}()
366367

367368
p, err = t.Exec(ctx, processID, spec, func(id string) (cio.IO, error) {
368-
rio, err = c.createIO(fifos, containerID, processID, stdinCloseSync, attachStdio)
369+
rio, err = c.createIO(fifos, containerID, processID, stdinCloseSync, attachStdio, spec.Terminal)
369370
return rio, err
370371
})
371372
if err != nil {
@@ -644,8 +645,16 @@ func (c *client) getProcess(containerID, processID string) (containerd.Process,
644645

645646
// createIO creates the io to be used by a process
646647
// This needs to get a pointer to interface as upon closure the process may not have yet been registered
647-
func (c *client) createIO(fifos *cio.FIFOSet, containerID, processID string, stdinCloseSync chan struct{}, attachStdio StdioCallback) (cio.IO, error) {
648-
io, err := cio.NewDirectIO(context.Background(), fifos)
648+
func (c *client) createIO(fifos *cio.FIFOSet, containerID, processID string, stdinCloseSync chan struct{}, attachStdio StdioCallback, terminal bool) (cio.IO, error) {
649+
var (
650+
io *cio.DirectIO
651+
err error
652+
)
653+
if terminal {
654+
io, err = cio.NewDirectIOWithTerminal(context.Background(), fifos)
655+
} else {
656+
io, err = cio.NewDirectIO(context.Background(), fifos)
657+
}
649658
if err != nil {
650659
return nil, err
651660
}

libcontainerd/remote_daemon_linux.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"syscall"
77
"time"
88

9+
"github.com/containerd/containerd/defaults"
910
"github.com/docker/docker/pkg/system"
1011
)
1112

@@ -18,6 +19,12 @@ func (r *remote) setDefaults() {
1819
if r.GRPC.Address == "" {
1920
r.GRPC.Address = filepath.Join(r.stateDir, sockFile)
2021
}
22+
if r.GRPC.MaxRecvMsgSize == 0 {
23+
r.GRPC.MaxRecvMsgSize = defaults.DefaultMaxRecvMsgSize
24+
}
25+
if r.GRPC.MaxSendMsgSize == 0 {
26+
r.GRPC.MaxSendMsgSize = defaults.DefaultMaxSendMsgSize
27+
}
2128
if r.Debug.Address == "" {
2229
r.Debug.Address = filepath.Join(r.stateDir, debugSockFile)
2330
}

0 commit comments

Comments
 (0)