Skip to content

Commit 4dd3e5b

Browse files
authored
Merge pull request moby#33075 from x1022as/stop
fix inconsistent state string with containerd
2 parents 5034288 + 8c340b7 commit 4dd3e5b

37 files changed

+1989
-18
lines changed

daemon/daemon.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"time"
2020

2121
"github.com/Sirupsen/logrus"
22-
containerd "github.com/docker/containerd/api/grpc/types"
22+
containerd "github.com/containerd/containerd/api/grpc/types"
2323
"github.com/docker/docker/api"
2424
"github.com/docker/docker/api/types"
2525
containertypes "github.com/docker/docker/api/types/container"

hack/dockerfile/binaries-commits

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ TOMLV_COMMIT=9baf8a8a9f2ed20a8e54160840c492f937eeaf9a
44

55
# When updating RUNC_COMMIT, also update runc in vendor.conf accordingly
66
RUNC_COMMIT=992a5be178a62e026f4069f443c6164912adbf09
7-
CONTAINERD_COMMIT=8ef7df579710405c4bb6e0812495671002ce08e0
7+
CONTAINERD_COMMIT=3addd840653146c90a254301d6c3a663c7fd6429
88
TINI_COMMIT=949e6facb77383876aeff8a6944dde66b3089574
99
LIBNETWORK_COMMIT=7b2b1feb1de4817d522cc372af149ff48d25028e
1010
VNDR_COMMIT=c56e082291115e369f77601f9c071dd0b87c7120

libcontainerd/client_linux.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import (
99
"time"
1010

1111
"github.com/Sirupsen/logrus"
12-
containerd "github.com/docker/containerd/api/grpc/types"
12+
containerd "github.com/containerd/containerd/api/grpc/types"
13+
containerd_runtime_types "github.com/containerd/containerd/runtime"
1314
"github.com/docker/docker/pkg/ioutils"
1415
"github.com/docker/docker/pkg/mount"
1516
"github.com/golang/protobuf/ptypes"
@@ -467,7 +468,7 @@ func (clnt *client) Restore(containerID string, attachStdio StdioCallback, optio
467468
cont, err := clnt.getContainerdContainer(containerID)
468469
// Get its last event
469470
ev, eerr := clnt.getContainerLastEvent(containerID)
470-
if err != nil || cont.Status == "Stopped" {
471+
if err != nil || containerd_runtime_types.State(cont.Status) == containerd_runtime_types.Stopped {
471472
if err != nil {
472473
logrus.Warnf("libcontainerd: failed to retrieve container %s state: %v", containerID, err)
473474
}

libcontainerd/client_unix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"sync"
1212

1313
"github.com/Sirupsen/logrus"
14-
containerd "github.com/docker/containerd/api/grpc/types"
14+
containerd "github.com/containerd/containerd/api/grpc/types"
1515
"github.com/docker/docker/pkg/idtools"
1616
specs "github.com/opencontainers/runtime-spec/specs-go"
1717
"golang.org/x/net/context"

libcontainerd/container_unix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"time"
1414

1515
"github.com/Sirupsen/logrus"
16-
containerd "github.com/docker/containerd/api/grpc/types"
16+
containerd "github.com/containerd/containerd/api/grpc/types"
1717
"github.com/docker/docker/pkg/ioutils"
1818
specs "github.com/opencontainers/runtime-spec/specs-go"
1919
"github.com/tonistiigi/fifo"

libcontainerd/process_unix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
goruntime "runtime"
1111
"strings"
1212

13-
containerd "github.com/docker/containerd/api/grpc/types"
13+
containerd "github.com/containerd/containerd/api/grpc/types"
1414
"github.com/tonistiigi/fifo"
1515
"golang.org/x/net/context"
1616
"golang.org/x/sys/unix"

libcontainerd/remote_unix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"time"
2020

2121
"github.com/Sirupsen/logrus"
22-
containerd "github.com/docker/containerd/api/grpc/types"
22+
containerd "github.com/containerd/containerd/api/grpc/types"
2323
"github.com/docker/docker/pkg/locker"
2424
"github.com/docker/docker/pkg/system"
2525
"github.com/golang/protobuf/ptypes"

libcontainerd/types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package libcontainerd
33
import (
44
"io"
55

6-
containerd "github.com/docker/containerd/api/grpc/types"
6+
containerd "github.com/containerd/containerd/api/grpc/types"
77
"github.com/opencontainers/runtime-spec/specs-go"
88
"golang.org/x/net/context"
99
)

libcontainerd/types_linux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package libcontainerd
22

33
import (
4-
containerd "github.com/docker/containerd/api/grpc/types"
4+
containerd "github.com/containerd/containerd/api/grpc/types"
55
"github.com/opencontainers/runtime-spec/specs-go"
66
)
77

libcontainerd/types_solaris.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package libcontainerd
22

33
import (
4-
containerd "github.com/docker/containerd/api/grpc/types"
4+
containerd "github.com/containerd/containerd/api/grpc/types"
55
"github.com/opencontainers/runtime-spec/specs-go"
66
)
77

libcontainerd/utils_linux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package libcontainerd
33
import (
44
"syscall"
55

6-
containerd "github.com/docker/containerd/api/grpc/types"
6+
containerd "github.com/containerd/containerd/api/grpc/types"
77
"github.com/opencontainers/runtime-spec/specs-go"
88
)
99

libcontainerd/utils_solaris.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package libcontainerd
33
import (
44
"syscall"
55

6-
containerd "github.com/docker/containerd/api/grpc/types"
6+
containerd "github.com/containerd/containerd/api/grpc/types"
77
"github.com/opencontainers/runtime-spec/specs-go"
88
)
99

vendor.conf

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ github.com/docker/go-units 9e638d38cf6977a37a8ea0078f3ee75a7cdb2dd1
1919
github.com/docker/go-connections e15c02316c12de00874640cd76311849de2aeed5
2020
golang.org/x/text f72d8390a633d5dfb0cc84043294db9f6c935756
2121
github.com/stretchr/testify 4d4bfba8f1d1027c4fdbe371823030df51419987
22+
github.com/pmezard/go-difflib v1.0.0
2223

2324
github.com/RackSec/srslog 456df3a81436d29ba874f3590eeeee25d666f8a5
2425
github.com/imdario/mergo 0.2.1
@@ -60,7 +61,7 @@ google.golang.org/grpc v1.0.4
6061
github.com/miekg/pkcs11 df8ae6ca730422dba20c768ff38ef7d79077a59f
6162

6263
# When updating, also update RUNC_COMMIT in hack/dockerfile/binaries-commits accordingly
63-
github.com/opencontainers/runc b6b70e53451794e8333e9b602cc096b47a20bd0f
64+
github.com/opencontainers/runc 992a5be178a62e026f4069f443c6164912adbf09
6465
github.com/opencontainers/runtime-spec v1.0.0-rc5 # specs
6566
github.com/opencontainers/image-spec f03dbe35d449c54915d235f1a3cf8f585a24babe
6667

@@ -102,7 +103,7 @@ google.golang.org/genproto b3e7c2fb04031add52c4817f53f43757ccbf9c18
102103
github.com/docker/docker-credential-helpers v0.5.0
103104

104105
# containerd
105-
github.com/docker/containerd 8ef7df579710405c4bb6e0812495671002ce08e0
106+
github.com/containerd/containerd 3addd840653146c90a254301d6c3a663c7fd6429
106107
github.com/tonistiigi/fifo 1405643975692217d6720f8b54aeee1bf2cd5cf4
107108

108109
# cluster

vendor/github.com/containerd/containerd/osutils/fds.go

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/containerd/osutils/pdeathsig_linux.go

+15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/containerd/osutils/pdeathsig_solaris.go

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/containerd/osutils/prctl.go

+48
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/containerd/osutils/prctl_solaris.go

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/containerd/containerd/osutils/reaper.go

+51
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)