Skip to content

Commit 52ed3e0

Browse files
committed
Update containerd to 1.1
Updates swarmkit, grpc, and all related vendors Signed-off-by: Derek McGowan <[email protected]>
1 parent d7e94d6 commit 52ed3e0

479 files changed

Lines changed: 41831 additions & 19093 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

hack/dockerfile/install/runc.installer

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
# When updating RUNC_COMMIT, also update runc in vendor.conf accordingly
4-
RUNC_COMMIT=4fc53a81fb7c994640722ac585fa9ca548971871
4+
RUNC_COMMIT=69663f0bd4b60df09991c08812a60108003fa340
55

66
install_runc() {
77
# Do not build with ambient capabilities support

integration/build/build_session_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func testBuildWithSession(t *testing.T, client dclient.APIClient, daemonHost str
9494
})
9595
sess.Allow(fsProvider)
9696

97-
g, ctx := errgroup.WithContext(context.Background())
97+
g, ctx := errgroup.WithContext(ctx)
9898

9999
g.Go(func() error {
100100
return sess.Run(ctx, client.DialSession)

libcontainerd/client_daemon.go

Lines changed: 102 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,17 @@ import (
1616
"syscall"
1717
"time"
1818

19-
"google.golang.org/grpc"
2019
"google.golang.org/grpc/codes"
2120
"google.golang.org/grpc/status"
2221

2322
"github.com/containerd/containerd"
24-
"github.com/containerd/containerd/api/events"
25-
eventsapi "github.com/containerd/containerd/api/services/events/v1"
23+
apievents "github.com/containerd/containerd/api/events"
2624
"github.com/containerd/containerd/api/types"
2725
"github.com/containerd/containerd/archive"
2826
"github.com/containerd/containerd/cio"
2927
"github.com/containerd/containerd/content"
3028
containerderrors "github.com/containerd/containerd/errdefs"
29+
"github.com/containerd/containerd/events"
3130
"github.com/containerd/containerd/images"
3231
"github.com/containerd/containerd/linux/runctypes"
3332
"github.com/containerd/typeurl"
@@ -729,137 +728,123 @@ func (c *client) processEvent(ctr *container, et EventType, ei EventInfo) {
729728

730729
func (c *client) processEventStream(ctx context.Context) {
731730
var (
732-
err error
733-
eventStream eventsapi.Events_SubscribeClient
734-
ev *eventsapi.Envelope
735-
et EventType
736-
ei EventInfo
737-
ctr *container
731+
err error
732+
ev *events.Envelope
733+
et EventType
734+
ei EventInfo
735+
ctr *container
738736
)
739-
defer func() {
740-
if err != nil {
741-
select {
742-
case <-ctx.Done():
743-
c.logger.WithError(ctx.Err()).
744-
Info("stopping event stream following graceful shutdown")
745-
default:
746-
go c.processEventStream(ctx)
747-
}
748-
}
749-
}()
750737

751-
eventStream, err = c.getRemote().EventService().Subscribe(ctx, &eventsapi.SubscribeRequest{
752-
Filters: []string{
753-
// Filter on both namespace *and* topic. To create an "and" filter,
754-
// this must be a single, comma-separated string
755-
"namespace==" + c.namespace + ",topic~=|^/tasks/|",
756-
},
757-
}, grpc.FailFast(false))
758-
if err != nil {
759-
return
760-
}
738+
// Filter on both namespace *and* topic. To create an "and" filter,
739+
// this must be a single, comma-separated string
740+
eventStream, errC := c.getRemote().EventService().Subscribe(ctx, "namespace=="+c.namespace+",topic~=|^/tasks/|")
761741

762742
c.logger.WithField("namespace", c.namespace).Debug("processing event stream")
763743

764744
var oomKilled bool
765745
for {
766-
ev, err = eventStream.Recv()
767-
if err != nil {
768-
errStatus, ok := status.FromError(err)
769-
if !ok || errStatus.Code() != codes.Canceled {
770-
c.logger.WithError(err).Error("failed to get event")
746+
select {
747+
case err = <-errC:
748+
if err != nil {
749+
errStatus, ok := status.FromError(err)
750+
if !ok || errStatus.Code() != codes.Canceled {
751+
c.logger.WithError(err).Error("failed to get event")
752+
go c.processEventStream(ctx)
753+
} else {
754+
c.logger.WithError(ctx.Err()).Info("stopping event stream following graceful shutdown")
755+
}
771756
}
772757
return
773-
}
774-
775-
if ev.Event == nil {
776-
c.logger.WithField("event", ev).Warn("invalid event")
777-
continue
778-
}
758+
case ev = <-eventStream:
759+
if ev.Event == nil {
760+
c.logger.WithField("event", ev).Warn("invalid event")
761+
continue
762+
}
779763

780-
v, err := typeurl.UnmarshalAny(ev.Event)
781-
if err != nil {
782-
c.logger.WithError(err).WithField("event", ev).Warn("failed to unmarshal event")
783-
continue
784-
}
764+
v, err := typeurl.UnmarshalAny(ev.Event)
765+
if err != nil {
766+
c.logger.WithError(err).WithField("event", ev).Warn("failed to unmarshal event")
767+
continue
768+
}
785769

786-
c.logger.WithField("topic", ev.Topic).Debug("event")
770+
c.logger.WithField("topic", ev.Topic).Debug("event")
787771

788-
switch t := v.(type) {
789-
case *events.TaskCreate:
790-
et = EventCreate
791-
ei = EventInfo{
792-
ContainerID: t.ContainerID,
793-
ProcessID: t.ContainerID,
794-
Pid: t.Pid,
795-
}
796-
case *events.TaskStart:
797-
et = EventStart
798-
ei = EventInfo{
799-
ContainerID: t.ContainerID,
800-
ProcessID: t.ContainerID,
801-
Pid: t.Pid,
802-
}
803-
case *events.TaskExit:
804-
et = EventExit
805-
ei = EventInfo{
806-
ContainerID: t.ContainerID,
807-
ProcessID: t.ID,
808-
Pid: t.Pid,
809-
ExitCode: t.ExitStatus,
810-
ExitedAt: t.ExitedAt,
811-
}
812-
case *events.TaskOOM:
813-
et = EventOOM
814-
ei = EventInfo{
815-
ContainerID: t.ContainerID,
816-
OOMKilled: true,
817-
}
818-
oomKilled = true
819-
case *events.TaskExecAdded:
820-
et = EventExecAdded
821-
ei = EventInfo{
822-
ContainerID: t.ContainerID,
823-
ProcessID: t.ExecID,
824-
}
825-
case *events.TaskExecStarted:
826-
et = EventExecStarted
827-
ei = EventInfo{
828-
ContainerID: t.ContainerID,
829-
ProcessID: t.ExecID,
830-
Pid: t.Pid,
831-
}
832-
case *events.TaskPaused:
833-
et = EventPaused
834-
ei = EventInfo{
835-
ContainerID: t.ContainerID,
772+
switch t := v.(type) {
773+
case *apievents.TaskCreate:
774+
et = EventCreate
775+
ei = EventInfo{
776+
ContainerID: t.ContainerID,
777+
ProcessID: t.ContainerID,
778+
Pid: t.Pid,
779+
}
780+
case *apievents.TaskStart:
781+
et = EventStart
782+
ei = EventInfo{
783+
ContainerID: t.ContainerID,
784+
ProcessID: t.ContainerID,
785+
Pid: t.Pid,
786+
}
787+
case *apievents.TaskExit:
788+
et = EventExit
789+
ei = EventInfo{
790+
ContainerID: t.ContainerID,
791+
ProcessID: t.ID,
792+
Pid: t.Pid,
793+
ExitCode: t.ExitStatus,
794+
ExitedAt: t.ExitedAt,
795+
}
796+
case *apievents.TaskOOM:
797+
et = EventOOM
798+
ei = EventInfo{
799+
ContainerID: t.ContainerID,
800+
OOMKilled: true,
801+
}
802+
oomKilled = true
803+
case *apievents.TaskExecAdded:
804+
et = EventExecAdded
805+
ei = EventInfo{
806+
ContainerID: t.ContainerID,
807+
ProcessID: t.ExecID,
808+
}
809+
case *apievents.TaskExecStarted:
810+
et = EventExecStarted
811+
ei = EventInfo{
812+
ContainerID: t.ContainerID,
813+
ProcessID: t.ExecID,
814+
Pid: t.Pid,
815+
}
816+
case *apievents.TaskPaused:
817+
et = EventPaused
818+
ei = EventInfo{
819+
ContainerID: t.ContainerID,
820+
}
821+
case *apievents.TaskResumed:
822+
et = EventResumed
823+
ei = EventInfo{
824+
ContainerID: t.ContainerID,
825+
}
826+
default:
827+
c.logger.WithFields(logrus.Fields{
828+
"topic": ev.Topic,
829+
"type": reflect.TypeOf(t)},
830+
).Info("ignoring event")
831+
continue
836832
}
837-
case *events.TaskResumed:
838-
et = EventResumed
839-
ei = EventInfo{
840-
ContainerID: t.ContainerID,
833+
834+
ctr = c.getContainer(ei.ContainerID)
835+
if ctr == nil {
836+
c.logger.WithField("container", ei.ContainerID).Warn("unknown container")
837+
continue
841838
}
842-
default:
843-
c.logger.WithFields(logrus.Fields{
844-
"topic": ev.Topic,
845-
"type": reflect.TypeOf(t)},
846-
).Info("ignoring event")
847-
continue
848-
}
849839

850-
ctr = c.getContainer(ei.ContainerID)
851-
if ctr == nil {
852-
c.logger.WithField("container", ei.ContainerID).Warn("unknown container")
853-
continue
854-
}
840+
if oomKilled {
841+
ctr.setOOMKilled(true)
842+
oomKilled = false
843+
}
844+
ei.OOMKilled = ctr.getOOMKilled()
855845

856-
if oomKilled {
857-
ctr.setOOMKilled(true)
858-
oomKilled = false
846+
c.processEvent(ctr, et, ei)
859847
}
860-
ei.OOMKilled = ctr.getOOMKilled()
861-
862-
c.processEvent(ctr, et, ei)
863848
}
864849
}
865850

libcontainerd/remote_daemon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
"github.com/BurntSushi/toml"
2020
"github.com/containerd/containerd"
21-
"github.com/containerd/containerd/server"
21+
"github.com/containerd/containerd/services/server"
2222
"github.com/docker/docker/pkg/system"
2323
"github.com/pkg/errors"
2424
"github.com/sirupsen/logrus"

vendor.conf

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# the following lines are in sorted order, FYI
22
github.com/Azure/go-ansiterm d6e3b3328b783f23731bc4d058875b0371ff8109
33
github.com/Microsoft/hcsshim v0.6.11
4-
github.com/Microsoft/go-winio v0.4.6
4+
github.com/Microsoft/go-winio v0.4.7
55
github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a
66
github.com/go-check/check 4ed411733c5785b40214c70bce814c3a3a689609 https://github.com/cpuguy83/check.git
77
github.com/golang/gddo 9b12a26f3fbd7397dee4e20939ddca719d840d2a
@@ -27,7 +27,7 @@ github.com/imdario/mergo 0.2.1
2727
golang.org/x/sync fd80eb99c8f653c847d294a001bdf2a3a6f768f5
2828

2929
# buildkit
30-
github.com/moby/buildkit b14fd548fe80c0399b105aeec5dbd96ccd2f7720
30+
github.com/moby/buildkit 43e758232a0ac7d50c6a11413186e16684fc1e4f
3131
github.com/tonistiigi/fsutil dc68c74458923f357474a9178bd198aa3ed11a5f
3232
github.com/grpc-ecosystem/grpc-opentracing 8e809c8a86450a29b90dcc9efbf062d0fe6d9746
3333
github.com/opentracing/opentracing-go 1361b9cd60be79c4c3a7fa9841b3c132e40066a7
@@ -70,10 +70,10 @@ github.com/opencontainers/go-digest v1.0.0-rc1
7070
github.com/mistifyio/go-zfs 22c9b32c84eb0d0c6f4043b6e90fc94073de92fa
7171
github.com/pborman/uuid v1.0
7272

73-
google.golang.org/grpc v1.3.0
73+
google.golang.org/grpc v1.12.0
7474

7575
# When updating, also update RUNC_COMMIT in hack/dockerfile/install/runc accordingly
76-
github.com/opencontainers/runc 4fc53a81fb7c994640722ac585fa9ca548971871
76+
github.com/opencontainers/runc 69663f0bd4b60df09991c08812a60108003fa340
7777
github.com/opencontainers/runtime-spec v1.0.1
7878
github.com/opencontainers/image-spec v1.0.1
7979
github.com/seccomp/libseccomp-golang 32f571b70023028bd57d9288c20efbcb237f3ce0
@@ -82,7 +82,7 @@ github.com/seccomp/libseccomp-golang 32f571b70023028bd57d9288c20efbcb237f3ce0
8282
github.com/coreos/go-systemd v17
8383
github.com/godbus/dbus v4.0.0
8484
github.com/syndtr/gocapability 2c00daeb6c3b45114c80ac44119e7b8801fdd852
85-
github.com/golang/protobuf 7a211bcf3bce0e3f1d74f9894916e6f116ae83b4
85+
github.com/golang/protobuf v1.1.0
8686

8787
# gelf logging driver deps
8888
github.com/Graylog2/go-gelf 4143646226541087117ff2f83334ea48b3201841
@@ -104,26 +104,27 @@ github.com/jmespath/go-jmespath 0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74
104104
github.com/bsphere/le_go 7a984a84b5492ae539b79b62fb4a10afc63c7bcf
105105

106106
# gcplogs deps
107-
golang.org/x/oauth2 96382aa079b72d8c014eb0c50f6c223d1e6a2de0
108-
google.golang.org/api 3cc2e591b550923a2c5f0ab5a803feda924d5823
109-
cloud.google.com/go 9d965e63e8cceb1b5d7977a202f0fcb8866d6525
110-
github.com/googleapis/gax-go da06d194a00e19ce00d9011a13931c3f6f6887c7
111-
google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944
107+
golang.org/x/oauth2 ec22f46f877b4505e0117eeaab541714644fdd28
108+
google.golang.org/api de943baf05a022a8f921b544b7827bacaba1aed5
109+
go.opencensus.io v0.11.0
110+
cloud.google.com/go v0.23.0
111+
github.com/googleapis/gax-go v2.0.0
112+
google.golang.org/genproto 694d95ba50e67b2e363f3483057db5d4910c18f9
112113

113114
# containerd
114-
github.com/containerd/containerd 4ac4fd0b6a268fe6f38b2b2e32e40daa7e424fac
115-
github.com/containerd/fifo fbfb6a11ec671efbe94ad1c12c2e98773f19e1e6
116-
github.com/containerd/continuity 2d3749b4da569ac97ca63dccba5eee4f5ee2beab
115+
github.com/containerd/containerd c7083eed5d8633d54c25fe81aa609010a4f2e495
116+
github.com/containerd/fifo 3d5202aec260678c48179c56f40e6f38a095738c
117+
github.com/containerd/continuity d3c23511c1bf5851696cba83143d9cbcd666869b
117118
github.com/containerd/cgroups fe281dd265766145e943a034aa41086474ea6130
118-
github.com/containerd/console 2748ece16665b45a47f884001d5831ec79703880
119-
github.com/containerd/go-runc 4f6e87ae043f859a38255247b49c9abc262d002f
119+
github.com/containerd/console cb7008ab3d8359b78c5f464cb7cf160107ad5925
120+
github.com/containerd/go-runc f271fa2021de855d4d918dbef83c5fe19db1bdd
120121
github.com/containerd/typeurl f6943554a7e7e88b3c14aad190bf05932da84788
121-
github.com/dmcgowan/go-tar go1.10
122122
github.com/stevvooe/ttrpc d4528379866b0ce7e9d71f3eb96f0582fc374577
123+
github.com/gogo/googleapis 08a7655d27152912db7aaf4f983275eaf8d128ef
123124

124125
# cluster
125-
github.com/docker/swarmkit bd69f6e8e301645afd344913fa1ede53a0a111fb
126-
github.com/gogo/protobuf v0.4
126+
github.com/docker/swarmkit edd5641391926a50bc5f7040e20b7efc05003c26
127+
github.com/gogo/protobuf v1.0.0
127128
github.com/cloudflare/cfssl 7fb22c8cba7ecaf98e4082d22d65800cf45e042a
128129
github.com/fernet/fernet-go 1b2437bc582b3cfbb341ee5a29f8ef5b42912ff2
129130
github.com/google/certificate-transparency d90e65c3a07988180c5b1ece71791c0b6506826e

vendor/cloud.google.com/go/LICENSE

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)