Merge pull request #121739 from ty-dc/runc/update-to-1.1.10
bump runc to v1.1.10
This commit is contained in:
4
go.mod
4
go.mod
@@ -49,11 +49,11 @@ require (
|
|||||||
github.com/libopenstorage/openstorage v1.0.0
|
github.com/libopenstorage/openstorage v1.0.0
|
||||||
github.com/lithammer/dedent v1.1.0
|
github.com/lithammer/dedent v1.1.0
|
||||||
github.com/moby/ipvs v1.1.0
|
github.com/moby/ipvs v1.1.0
|
||||||
github.com/mrunalp/fileutils v0.5.0
|
github.com/mrunalp/fileutils v0.5.1
|
||||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
|
||||||
github.com/onsi/ginkgo/v2 v2.13.0
|
github.com/onsi/ginkgo/v2 v2.13.0
|
||||||
github.com/onsi/gomega v1.29.0
|
github.com/onsi/gomega v1.29.0
|
||||||
github.com/opencontainers/runc v1.1.9
|
github.com/opencontainers/runc v1.1.10
|
||||||
github.com/opencontainers/selinux v1.11.0
|
github.com/opencontainers/selinux v1.11.0
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/pmezard/go-difflib v1.0.0
|
github.com/pmezard/go-difflib v1.0.0
|
||||||
|
8
go.sum
8
go.sum
@@ -644,8 +644,8 @@ github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwd
|
|||||||
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0=
|
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0=
|
||||||
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4=
|
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4=
|
||||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||||
github.com/mrunalp/fileutils v0.5.0 h1:NKzVxiH7eSk+OQ4M+ZYW1K6h27RUV3MI6NUTsHhU6Z4=
|
github.com/mrunalp/fileutils v0.5.1 h1:F+S7ZlNKnrwHfSwdlgNSkKo67ReVf8o9fel6C3dkm/Q=
|
||||||
github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
|
github.com/mrunalp/fileutils v0.5.1/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ=
|
||||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||||
@@ -661,8 +661,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
|
|||||||
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
|
||||||
github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
|
github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=
|
||||||
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
|
github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
|
||||||
github.com/opencontainers/runc v1.1.9 h1:XR0VIHTGce5eWPkaPesqTBrhW2yAcaraWfsEalNwQLM=
|
github.com/opencontainers/runc v1.1.10 h1:EaL5WeO9lv9wmS6SASjszOeQdSctvpbu0DdBQBizE40=
|
||||||
github.com/opencontainers/runc v1.1.9/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50=
|
github.com/opencontainers/runc v1.1.10/go.mod h1:+/R6+KmDlh+hOO8NkjmgkG9Qzvypzk0yXxAPYYR65+M=
|
||||||
github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||||
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||||
github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 h1:R5M2qXZiK/mWPMT4VldCOiSL9HIAMuxQZWdG0CSM5+4=
|
github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 h1:R5M2qXZiK/mWPMT4VldCOiSL9HIAMuxQZWdG0CSM5+4=
|
||||||
|
11
vendor/github.com/mrunalp/fileutils/fileutils.go
generated
vendored
11
vendor/github.com/mrunalp/fileutils/fileutils.go
generated
vendored
@@ -125,6 +125,7 @@ func CopyDirectory(source string, dest string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
destPath := filepath.Join(dest, relPath)
|
||||||
|
|
||||||
if info.IsDir() {
|
if info.IsDir() {
|
||||||
// Skip the source directory.
|
// Skip the source directory.
|
||||||
@@ -138,18 +139,20 @@ func CopyDirectory(source string, dest string) error {
|
|||||||
uid := int(st.Uid)
|
uid := int(st.Uid)
|
||||||
gid := int(st.Gid)
|
gid := int(st.Gid)
|
||||||
|
|
||||||
if err := os.Mkdir(filepath.Join(dest, relPath), info.Mode()); err != nil {
|
if err := os.Mkdir(destPath, info.Mode()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err := os.Lchown(destPath, uid, gid); err != nil {
|
||||||
if err := os.Lchown(filepath.Join(dest, relPath), uid, gid); err != nil {
|
return err
|
||||||
|
}
|
||||||
|
if err := os.Chmod(destPath, info.Mode()); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return CopyFile(path, filepath.Join(dest, relPath))
|
return CopyFile(path, destPath)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
3
vendor/github.com/mrunalp/fileutils/idtools.go
generated
vendored
3
vendor/github.com/mrunalp/fileutils/idtools.go
generated
vendored
@@ -49,6 +49,9 @@ func MkdirAllNewAs(path string, mode os.FileMode, ownerUID, ownerGID int) error
|
|||||||
if err := os.Chown(pathComponent, ownerUID, ownerGID); err != nil {
|
if err := os.Chown(pathComponent, ownerUID, ownerGID); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if err := os.Chmod(pathComponent, mode); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
3
vendor/github.com/opencontainers/runc/libcontainer/cgroups/file.go
generated
vendored
3
vendor/github.com/opencontainers/runc/libcontainer/cgroups/file.go
generated
vendored
@@ -10,6 +10,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/opencontainers/runc/libcontainer/utils"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
@@ -122,7 +123,7 @@ func openFile(dir, file string, flags int) (*os.File, error) {
|
|||||||
flags |= os.O_TRUNC | os.O_CREATE
|
flags |= os.O_TRUNC | os.O_CREATE
|
||||||
mode = 0o600
|
mode = 0o600
|
||||||
}
|
}
|
||||||
path := path.Join(dir, file)
|
path := path.Join(dir, utils.CleanPath(file))
|
||||||
if prepareOpenat2() != nil {
|
if prepareOpenat2() != nil {
|
||||||
return openFallback(path, flags, mode)
|
return openFallback(path, flags, mode)
|
||||||
}
|
}
|
||||||
|
36
vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go
generated
vendored
36
vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/hugetlb.go
generated
vendored
@@ -1,6 +1,8 @@
|
|||||||
package fs
|
package fs
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/opencontainers/runc/libcontainer/cgroups"
|
"github.com/opencontainers/runc/libcontainer/cgroups"
|
||||||
@@ -19,8 +21,23 @@ func (s *HugetlbGroup) Apply(path string, _ *configs.Resources, pid int) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *HugetlbGroup) Set(path string, r *configs.Resources) error {
|
func (s *HugetlbGroup) Set(path string, r *configs.Resources) error {
|
||||||
|
const suffix = ".limit_in_bytes"
|
||||||
|
skipRsvd := false
|
||||||
|
|
||||||
for _, hugetlb := range r.HugetlbLimit {
|
for _, hugetlb := range r.HugetlbLimit {
|
||||||
if err := cgroups.WriteFile(path, "hugetlb."+hugetlb.Pagesize+".limit_in_bytes", strconv.FormatUint(hugetlb.Limit, 10)); err != nil {
|
prefix := "hugetlb." + hugetlb.Pagesize
|
||||||
|
val := strconv.FormatUint(hugetlb.Limit, 10)
|
||||||
|
if err := cgroups.WriteFile(path, prefix+suffix, val); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if skipRsvd {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if err := cgroups.WriteFile(path, prefix+".rsvd"+suffix, val); err != nil {
|
||||||
|
if errors.Is(err, os.ErrNotExist) {
|
||||||
|
skipRsvd = true
|
||||||
|
continue
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -32,24 +49,29 @@ func (s *HugetlbGroup) GetStats(path string, stats *cgroups.Stats) error {
|
|||||||
if !cgroups.PathExists(path) {
|
if !cgroups.PathExists(path) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
rsvd := ".rsvd"
|
||||||
hugetlbStats := cgroups.HugetlbStats{}
|
hugetlbStats := cgroups.HugetlbStats{}
|
||||||
for _, pageSize := range cgroups.HugePageSizes() {
|
for _, pageSize := range cgroups.HugePageSizes() {
|
||||||
usage := "hugetlb." + pageSize + ".usage_in_bytes"
|
again:
|
||||||
value, err := fscommon.GetCgroupParamUint(path, usage)
|
prefix := "hugetlb." + pageSize + rsvd
|
||||||
|
|
||||||
|
value, err := fscommon.GetCgroupParamUint(path, prefix+".usage_in_bytes")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if rsvd != "" && errors.Is(err, os.ErrNotExist) {
|
||||||
|
rsvd = ""
|
||||||
|
goto again
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
hugetlbStats.Usage = value
|
hugetlbStats.Usage = value
|
||||||
|
|
||||||
maxUsage := "hugetlb." + pageSize + ".max_usage_in_bytes"
|
value, err = fscommon.GetCgroupParamUint(path, prefix+".max_usage_in_bytes")
|
||||||
value, err = fscommon.GetCgroupParamUint(path, maxUsage)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
hugetlbStats.MaxUsage = value
|
hugetlbStats.MaxUsage = value
|
||||||
|
|
||||||
failcnt := "hugetlb." + pageSize + ".failcnt"
|
value, err = fscommon.GetCgroupParamUint(path, prefix+".failcnt")
|
||||||
value, err = fscommon.GetCgroupParamUint(path, failcnt)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
6
vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go
generated
vendored
6
vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/memory.go
generated
vendored
@@ -234,6 +234,12 @@ func getMemoryData(path, name string) (cgroups.MemoryData, error) {
|
|||||||
memoryData.Failcnt = value
|
memoryData.Failcnt = value
|
||||||
value, err = fscommon.GetCgroupParamUint(path, limit)
|
value, err = fscommon.GetCgroupParamUint(path, limit)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if name == "kmem" && os.IsNotExist(err) {
|
||||||
|
// Ignore ENOENT as kmem.limit_in_bytes has
|
||||||
|
// been removed in newer kernels.
|
||||||
|
return memoryData, nil
|
||||||
|
}
|
||||||
|
|
||||||
return cgroups.MemoryData{}, err
|
return cgroups.MemoryData{}, err
|
||||||
}
|
}
|
||||||
memoryData.Limit = value
|
memoryData.Limit = value
|
||||||
|
30
vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go
generated
vendored
30
vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs2/hugetlb.go
generated
vendored
@@ -1,6 +1,8 @@
|
|||||||
package fs2
|
package fs2
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/opencontainers/runc/libcontainer/cgroups"
|
"github.com/opencontainers/runc/libcontainer/cgroups"
|
||||||
@@ -16,8 +18,22 @@ func setHugeTlb(dirPath string, r *configs.Resources) error {
|
|||||||
if !isHugeTlbSet(r) {
|
if !isHugeTlbSet(r) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
const suffix = ".max"
|
||||||
|
skipRsvd := false
|
||||||
for _, hugetlb := range r.HugetlbLimit {
|
for _, hugetlb := range r.HugetlbLimit {
|
||||||
if err := cgroups.WriteFile(dirPath, "hugetlb."+hugetlb.Pagesize+".max", strconv.FormatUint(hugetlb.Limit, 10)); err != nil {
|
prefix := "hugetlb." + hugetlb.Pagesize
|
||||||
|
val := strconv.FormatUint(hugetlb.Limit, 10)
|
||||||
|
if err := cgroups.WriteFile(dirPath, prefix+suffix, val); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if skipRsvd {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if err := cgroups.WriteFile(dirPath, prefix+".rsvd"+suffix, val); err != nil {
|
||||||
|
if errors.Is(err, os.ErrNotExist) {
|
||||||
|
skipRsvd = true
|
||||||
|
continue
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,15 +43,21 @@ func setHugeTlb(dirPath string, r *configs.Resources) error {
|
|||||||
|
|
||||||
func statHugeTlb(dirPath string, stats *cgroups.Stats) error {
|
func statHugeTlb(dirPath string, stats *cgroups.Stats) error {
|
||||||
hugetlbStats := cgroups.HugetlbStats{}
|
hugetlbStats := cgroups.HugetlbStats{}
|
||||||
|
rsvd := ".rsvd"
|
||||||
for _, pagesize := range cgroups.HugePageSizes() {
|
for _, pagesize := range cgroups.HugePageSizes() {
|
||||||
value, err := fscommon.GetCgroupParamUint(dirPath, "hugetlb."+pagesize+".current")
|
again:
|
||||||
|
prefix := "hugetlb." + pagesize + rsvd
|
||||||
|
value, err := fscommon.GetCgroupParamUint(dirPath, prefix+".current")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if rsvd != "" && errors.Is(err, os.ErrNotExist) {
|
||||||
|
rsvd = ""
|
||||||
|
goto again
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
hugetlbStats.Usage = value
|
hugetlbStats.Usage = value
|
||||||
|
|
||||||
fileName := "hugetlb." + pagesize + ".events"
|
value, err = fscommon.GetValueByKey(dirPath, prefix+".events", "max")
|
||||||
value, err = fscommon.GetValueByKey(dirPath, fileName, "max")
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
2
vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_linux.go
generated
vendored
2
vendor/github.com/opencontainers/runc/libcontainer/seccomp/patchbpf/enosys_linux.go
generated
vendored
@@ -81,7 +81,7 @@ import "C"
|
|||||||
var retErrnoEnosys = uint32(C.C_ACT_ERRNO_ENOSYS)
|
var retErrnoEnosys = uint32(C.C_ACT_ERRNO_ENOSYS)
|
||||||
|
|
||||||
// This syscall is used for multiplexing "large" syscalls on s390(x). Unknown
|
// This syscall is used for multiplexing "large" syscalls on s390(x). Unknown
|
||||||
// syscalls will end up with this syscall number, so we need to explcitly
|
// syscalls will end up with this syscall number, so we need to explicitly
|
||||||
// return -ENOSYS for this syscall on those architectures.
|
// return -ENOSYS for this syscall on those architectures.
|
||||||
const s390xMultiplexSyscall libseccomp.ScmpSyscall = 0
|
const s390xMultiplexSyscall libseccomp.ScmpSyscall = 0
|
||||||
|
|
||||||
|
4
vendor/modules.txt
vendored
4
vendor/modules.txt
vendored
@@ -540,7 +540,7 @@ github.com/mohae/deepcopy
|
|||||||
# github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00
|
# github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00
|
||||||
## explicit
|
## explicit
|
||||||
github.com/monochromegane/go-gitignore
|
github.com/monochromegane/go-gitignore
|
||||||
# github.com/mrunalp/fileutils v0.5.0
|
# github.com/mrunalp/fileutils v0.5.1
|
||||||
## explicit; go 1.13
|
## explicit; go 1.13
|
||||||
github.com/mrunalp/fileutils
|
github.com/mrunalp/fileutils
|
||||||
# github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
|
# github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
|
||||||
@@ -591,7 +591,7 @@ github.com/onsi/gomega/types
|
|||||||
# github.com/opencontainers/go-digest v1.0.0
|
# github.com/opencontainers/go-digest v1.0.0
|
||||||
## explicit; go 1.13
|
## explicit; go 1.13
|
||||||
github.com/opencontainers/go-digest
|
github.com/opencontainers/go-digest
|
||||||
# github.com/opencontainers/runc v1.1.9
|
# github.com/opencontainers/runc v1.1.10
|
||||||
## explicit; go 1.17
|
## explicit; go 1.17
|
||||||
github.com/opencontainers/runc/libcontainer
|
github.com/opencontainers/runc/libcontainer
|
||||||
github.com/opencontainers/runc/libcontainer/apparmor
|
github.com/opencontainers/runc/libcontainer/apparmor
|
||||||
|
Reference in New Issue
Block a user