Skip to content

Commit 8bfaf4f

Browse files
authored
Merge pull request #252 from kzys/containerd-13
Upgrade containerd to 1.3.0-beta.2
2 parents 7118ee1 + cb1bede commit 8bfaf4f

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

agent/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ import (
2323
"github.com/containerd/containerd/events/exchange"
2424
"github.com/containerd/containerd/log"
2525
"github.com/containerd/containerd/namespaces"
26-
"github.com/containerd/containerd/runtime/v2/shim"
2726
taskAPI "github.com/containerd/containerd/runtime/v2/task"
28-
"github.com/containerd/containerd/sys"
27+
"github.com/containerd/containerd/sys/reaper"
2928
"github.com/containerd/ttrpc"
3029
"github.com/mdlayher/vsock"
30+
"github.com/opencontainers/runc/libcontainer/system"
3131
"github.com/sirupsen/logrus"
3232
"golang.org/x/sync/errgroup"
3333
"golang.org/x/sys/unix"
@@ -67,7 +67,7 @@ func main() {
6767

6868
// Ensure this process is a subreaper or else containers created via runc will
6969
// not be its children.
70-
if err := sys.SetSubreaper(enableSubreaper); err != nil {
70+
if err := system.SetSubreaper(enableSubreaper); err != nil {
7171
log.G(shimCtx).WithError(err).Fatal("failed to set shim as subreaper")
7272
}
7373

@@ -116,7 +116,7 @@ func main() {
116116
case s := <-signals:
117117
switch s {
118118
case unix.SIGCHLD:
119-
if err := shim.Reap(); err != nil {
119+
if err := reaper.Reap(); err != nil {
120120
log.G(shimCtx).WithError(err).Error("reap error")
121121
}
122122
case syscall.SIGINT, syscall.SIGTERM:

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ require (
66
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705 // indirect
77
github.com/containerd/cgroups v0.0.0-20181105182409-82cb49fc1779 // indirect
88
github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50 // indirect
9-
github.com/containerd/containerd v1.2.1-0.20190711201753-f2b6c31d0fa7
9+
github.com/containerd/containerd v1.3.0-beta.2
1010
github.com/containerd/continuity v0.0.0-20181027224239-bea7585dbfac
11-
github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260
11+
github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c
1212
github.com/containerd/go-runc v0.0.0-20190226155025-7d11b49dc076 // indirect
1313
github.com/containerd/ttrpc v0.0.0-20190613183316-1fb3814edf44
1414
github.com/containerd/typeurl v0.0.0-20181015155603-461401dc8f19
@@ -29,7 +29,7 @@ require (
2929
github.com/mdlayher/vsock v0.0.0-20190329173812-a92c53d5dcab
3030
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
3131
github.com/opencontainers/image-spec v1.0.1 // indirect
32-
github.com/opencontainers/runc v0.1.1 // indirect
32+
github.com/opencontainers/runc v1.0.0-rc8
3333
github.com/opencontainers/runtime-spec v0.1.2-0.20181106065543-31e0d16c1cb7
3434
github.com/pkg/errors v0.8.1
3535
github.com/prometheus/client_golang v0.9.2 // indirect

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ github.com/containerd/cgroups v0.0.0-20181105182409-82cb49fc1779 h1:j1IsLW6/hNZP
2020
github.com/containerd/cgroups v0.0.0-20181105182409-82cb49fc1779/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI=
2121
github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50 h1:WMpHmC6AxwWb9hMqhudkqG7A/p14KiMnl6d3r1iUMjU=
2222
github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw=
23-
github.com/containerd/containerd v1.2.1-0.20190711201753-f2b6c31d0fa7 h1:oIh8usyIH8KVp/+g15ki0h9wizhWZraz5l5AKu9wGqM=
24-
github.com/containerd/containerd v1.2.1-0.20190711201753-f2b6c31d0fa7/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
23+
github.com/containerd/containerd v1.3.0-beta.2 h1:pNq4VOyEjYN11bpJK0EQkWF31vi5LmWLWwGeSD5MRlo=
24+
github.com/containerd/containerd v1.3.0-beta.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA=
2525
github.com/containerd/continuity v0.0.0-20181027224239-bea7585dbfac h1:PThQaO4yCvJzJBUW1XoFQxLotWRhvX2fgljJX8yrhFI=
2626
github.com/containerd/continuity v0.0.0-20181027224239-bea7585dbfac/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
27-
github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260 h1:XGyg7oTtD0DoRFhbpV6x1WfV0flKC4UxXU7ab1zC08U=
28-
github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
27+
github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c h1:KFbqHhDeaHM7IfFtXHfUHMDaUStpM2YwBR+iJCIOsKk=
28+
github.com/containerd/fifo v0.0.0-20190816180239-bda0ff6ed73c/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI=
2929
github.com/containerd/go-runc v0.0.0-20190226155025-7d11b49dc076 h1:biYGul6kwz5/Lh6UxkYQyRKPeYA/ZL5n2pdCAcYUpLA=
3030
github.com/containerd/go-runc v0.0.0-20190226155025-7d11b49dc076/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0=
3131
github.com/containerd/ttrpc v0.0.0-20190613183316-1fb3814edf44 h1:vG5QXCUakUhR2CRI44aD3joCWcvb5mfZRxcwVqBVGeU=
@@ -118,8 +118,8 @@ github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2i
118118
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
119119
github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
120120
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
121-
github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y=
122-
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
121+
github.com/opencontainers/runc v1.0.0-rc8 h1:dDCFes8Hj1r/i5qnypONo5jdOme/8HWZC/aNDyhECt0=
122+
github.com/opencontainers/runc v1.0.0-rc8/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
123123
github.com/opencontainers/runtime-spec v0.1.2-0.20181106065543-31e0d16c1cb7 h1:vg5OQBKq2D0TX7q7loKQBLZ54IUAbUvq1rlwDRdn1gY=
124124
github.com/opencontainers/runtime-spec v0.1.2-0.20181106065543-31e0d16c1cb7/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
125125
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=

runtime/service_integ_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ func TestShimExitsUponContainerDelete_Isolated(t *testing.T) {
9494
containerd.WithNewSnapshot(snapshotName, image),
9595
containerd.WithNewSpec(
9696
oci.WithProcessArgs("sleep", fmt.Sprintf("%d", testTimeout/time.Second)),
97+
oci.WithDefaultPathEnv,
9798
),
9899
)
99100
require.NoError(t, err, "failed to create container %s", containerName)
@@ -105,6 +106,7 @@ func TestShimExitsUponContainerDelete_Isolated(t *testing.T) {
105106
containerd.WithNewSnapshot(snapshotName, image),
106107
containerd.WithNewSpec(
107108
oci.WithProcessArgs("sleep", fmt.Sprintf("%d", testTimeout/time.Second)),
109+
oci.WithDefaultPathEnv,
108110
),
109111
)
110112
require.Error(t, err, "should not be able to create additional container when no drives are available")
@@ -610,7 +612,7 @@ func testCreateContainerWithSameName(t *testing.T, vmID string) {
610612
require.NoError(t, err)
611613
}
612614

613-
withNewSpec := containerd.WithNewSpec(oci.WithProcessArgs("echo", "hello"), firecrackeroci.WithVMID(vmID))
615+
withNewSpec := containerd.WithNewSpec(oci.WithProcessArgs("echo", "hello"), firecrackeroci.WithVMID(vmID), oci.WithDefaultPathEnv)
614616

615617
client, err := containerd.New(containerdSockPath, containerd.WithDefaultRuntime(firecrackerRuntime))
616618
require.NoError(t, err, "unable to create client to containerd service at %s, is containerd running?", containerdSockPath)
@@ -691,7 +693,7 @@ func TestCreateTooManyContainers_Isolated(t *testing.T) {
691693
image, err := client.Pull(ctx, guestDockerImage, containerd.WithPullUnpack, containerd.WithPullSnapshotter(naiveSnapshotterName))
692694
require.NoError(t, err, "failed to pull image %s, is the the %s snapshotter running?", guestDockerImage, naiveSnapshotterName)
693695

694-
runEchoHello := containerd.WithNewSpec(oci.WithProcessArgs("echo", "-n", "hello"), firecrackeroci.WithVMID("reuse-same-vm"))
696+
runEchoHello := containerd.WithNewSpec(oci.WithProcessArgs("echo", "-n", "hello"), firecrackeroci.WithVMID("reuse-same-vm"), oci.WithDefaultPathEnv)
695697

696698
c1, err := client.NewContainer(ctx,
697699
"c1",

0 commit comments

Comments
 (0)