Update dependency opencontainer/runc

This commit is contained in:
Odin Ugedal
2019-06-20 20:34:03 +02:00
parent 81c8552d7e
commit 2bcdb944f0
42 changed files with 1415 additions and 631 deletions

View File

@@ -38,7 +38,7 @@ func GetPids(cgroupPath string) ([]int, error) {
func getCgroupPath(cgroupPath string) (string, error) {
cgroupPath = libcontainerutils.CleanPath(cgroupPath)
mnt, root, err := libcontainercgroups.FindCgroupMountpointAndRoot("devices")
mnt, root, err := libcontainercgroups.FindCgroupMountpointAndRoot(cgroupPath, "devices")
// If we didn't mount the subsystem, there is no point we make the path.
if err != nil {
return "", err

View File

@@ -31,6 +31,7 @@ go_test(
embed = [":go_default_library"],
deps = select({
"@io_bazel_rules_go//go/platform:linux": [
"//vendor/github.com/opencontainers/runc/libcontainer/cgroups:go_default_library",
"//vendor/github.com/stretchr/testify/assert:go_default_library",
],
"//conditions:default": [],

View File

@@ -19,7 +19,7 @@ limitations under the License.
package oom
import (
"os"
"github.com/opencontainers/runc/libcontainer/cgroups"
"testing"
"github.com/stretchr/testify/assert"
@@ -100,5 +100,5 @@ func TestOOMScoreAdjContainer(t *testing.T) {
func TestPidListerFailure(t *testing.T) {
_, err := getPids("/does/not/exist")
assert.True(t, os.IsNotExist(err), "expected getPids to return not exists error. Got %v", err)
assert.True(t, cgroups.IsNotFound(err), "expected getPids to return not exists error. Got %v", err)
}