mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-16 21:07:22 +00:00
Update dependency opencontainer/runc
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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": [],
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user