vendor: opencontainers/runc v1.0.0-rc91-48-g67169a9d
full diff: https://github.com/opencontainers/runc/compare/v1.0.0-rc91...67169a9d43456ff0d5ae12b967acb8e366e2f181 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
7
vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_linux.go
generated
vendored
7
vendor/github.com/opencontainers/runc/libcontainer/configs/cgroup_linux.go
generated
vendored
@@ -126,4 +126,11 @@ type Resources struct {
|
||||
|
||||
// CpuWeight sets a proportional bandwidth limit.
|
||||
CpuWeight uint64 `json:"cpu_weight"`
|
||||
|
||||
// SkipDevices allows to skip configuring device permissions.
|
||||
// Used by e.g. kubelet while creating a parent cgroup (kubepods)
|
||||
// common for many containers.
|
||||
//
|
||||
// NOTE it is impossible to start a container which has this flag set.
|
||||
SkipDevices bool `json:"skip_devices"`
|
||||
}
|
||||
|
||||
12
vendor/github.com/opencontainers/runc/libcontainer/configs/device.go
generated
vendored
12
vendor/github.com/opencontainers/runc/libcontainer/configs/device.go
generated
vendored
@@ -1,20 +1,15 @@
|
||||
package configs
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const (
|
||||
Wildcard = -1
|
||||
)
|
||||
|
||||
// TODO Windows: This can be factored out in the future
|
||||
|
||||
type Device struct {
|
||||
DeviceRule
|
||||
|
||||
@@ -173,10 +168,3 @@ func (d *DeviceRule) CgroupString() string {
|
||||
}
|
||||
return fmt.Sprintf("%c %s:%s %s", d.Type, major, minor, d.Permissions)
|
||||
}
|
||||
|
||||
func (d *DeviceRule) Mkdev() (uint64, error) {
|
||||
if d.Major == Wildcard || d.Minor == Wildcard {
|
||||
return 0, errors.New("cannot mkdev() device with wildcards")
|
||||
}
|
||||
return unix.Mkdev(uint32(d.Major), uint32(d.Minor)), nil
|
||||
}
|
||||
|
||||
16
vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go
generated
vendored
Normal file
16
vendor/github.com/opencontainers/runc/libcontainer/configs/device_unix.go
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// +build !windows
|
||||
|
||||
package configs
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func (d *DeviceRule) Mkdev() (uint64, error) {
|
||||
if d.Major == Wildcard || d.Minor == Wildcard {
|
||||
return 0, errors.New("cannot mkdev() device with wildcards")
|
||||
}
|
||||
return unix.Mkdev(uint32(d.Major), uint32(d.Minor)), nil
|
||||
}
|
||||
5
vendor/github.com/opencontainers/runc/libcontainer/configs/device_windows.go
generated
vendored
Normal file
5
vendor/github.com/opencontainers/runc/libcontainer/configs/device_windows.go
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
package configs
|
||||
|
||||
func (d *DeviceRule) Mkdev() (uint64, error) {
|
||||
return 0, nil
|
||||
}
|
||||
Reference in New Issue
Block a user