diff options
author | Lantao Liu <lantaol@google.com> | 2019-05-10 18:27:49 -0700 |
---|---|---|
committer | Ian Lewis <ianlewis@google.com> | 2019-05-11 10:27:49 +0900 |
commit | 97875daf63d03cda6ff3c4f393a004a8295a748e (patch) | |
tree | 30dce772c1d7bb9d77fab8b224675630e3c10b2d /vendor/github.com/containerd/cgroups/paths.go | |
parent | 14f1de4a45daa75ef016fabb56d86cbd9b902504 (diff) |
Port shim fix (#27)
Port shim fixes containerd/containerd#3264, containerd/containerd#3264
Update containerd to newest release/1.2 commit.
Diffstat (limited to 'vendor/github.com/containerd/cgroups/paths.go')
-rw-r--r-- | vendor/github.com/containerd/cgroups/paths.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/github.com/containerd/cgroups/paths.go b/vendor/github.com/containerd/cgroups/paths.go index 455ce857f..f45fd4256 100644 --- a/vendor/github.com/containerd/cgroups/paths.go +++ b/vendor/github.com/containerd/cgroups/paths.go @@ -57,6 +57,9 @@ func PidPath(pid int) Path { return existingPath(paths, "") } +// ErrControllerNotActive is returned when a controller is not supported or enabled +var ErrControllerNotActive = errors.New("controller is not supported") + func existingPath(paths map[string]string, suffix string) Path { // localize the paths based on the root mount dest for nested cgroups for n, p := range paths { @@ -77,7 +80,7 @@ func existingPath(paths map[string]string, suffix string) Path { root, ok := paths[string(name)] if !ok { if root, ok = paths[fmt.Sprintf("name=%s", name)]; !ok { - return "", fmt.Errorf("unable to find %q in controller set", name) + return "", ErrControllerNotActive } } if suffix != "" { |