summaryrefslogtreecommitdiff
path: root/vendor/github.com/opencontainers
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/opencontainers')
-rw-r--r--vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go2
-rw-r--r--vendor/github.com/opencontainers/runc/libcontainer/configs/intelrdt.go4
-rw-r--r--vendor/github.com/opencontainers/runtime-spec/specs-go/config.go22
-rw-r--r--vendor/github.com/opencontainers/runtime-tools/README.md4
-rw-r--r--vendor/github.com/opencontainers/runtime-tools/generate/generate.go34
5 files changed, 47 insertions, 19 deletions
diff --git a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go
index ea571ad93..316d963d6 100644
--- a/vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go
+++ b/vendor/github.com/opencontainers/runc/libcontainer/cgroups/utils.go
@@ -463,7 +463,7 @@ func WriteCgroupProc(dir string, pid int) error {
return fmt.Errorf("no such directory for %s", CgroupProcesses)
}
- // Don't attach any pid to the cgroup if -1 is specified as a pid
+ // Dont attach any pid to the cgroup if -1 is specified as a pid
if pid != -1 {
if err := ioutil.WriteFile(filepath.Join(dir, CgroupProcesses), []byte(strconv.Itoa(pid)), 0700); err != nil {
return fmt.Errorf("failed to write %v to %v: %v", pid, CgroupProcesses, err)
diff --git a/vendor/github.com/opencontainers/runc/libcontainer/configs/intelrdt.go b/vendor/github.com/opencontainers/runc/libcontainer/configs/intelrdt.go
index 57e9f037d..6f47aac07 100644
--- a/vendor/github.com/opencontainers/runc/libcontainer/configs/intelrdt.go
+++ b/vendor/github.com/opencontainers/runc/libcontainer/configs/intelrdt.go
@@ -5,9 +5,7 @@ type IntelRdt struct {
// Format: "L3:<cache_id0>=<cbm0>;<cache_id1>=<cbm1>;..."
L3CacheSchema string `json:"l3_cache_schema,omitempty"`
- // The schema of memory bandwidth per L3 cache id
+ // The schema of memory bandwidth percentage per L3 cache id
// Format: "MB:<cache_id0>=bandwidth0;<cache_id1>=bandwidth1;..."
- // The unit of memory bandwidth is specified in "percentages" by
- // default, and in "MBps" if MBA Software Controller is enabled.
MemBwSchema string `json:"memBwSchema,omitempty"`
}
diff --git a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
index 7781c5361..6d791e7e9 100644
--- a/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
+++ b/vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
@@ -160,8 +160,8 @@ type Linux struct {
ReadonlyPaths []string `json:"readonlyPaths,omitempty"`
// MountLabel specifies the selinux context for the mounts in the container.
MountLabel string `json:"mountLabel,omitempty"`
- // IntelRdt contains Intel Resource Director Technology (RDT) information
- // for handling resource constraints (e.g., L3 cache) for the container
+ // IntelRdt contains Intel Resource Director Technology (RDT) information for
+ // handling resource constraints (e.g., L3 cache, memory bandwidth) for the container
IntelRdt *LinuxIntelRdt `json:"intelRdt,omitempty"`
}
@@ -503,6 +503,8 @@ type WindowsNetwork struct {
DNSSearchList []string `json:"DNSSearchList,omitempty"`
// Name (ID) of the container that we will share with the network stack.
NetworkSharedContainerName string `json:"networkSharedContainerName,omitempty"`
+ // name (ID) of the network namespace that will be used for the container.
+ NetworkNamespace string `json:"networkNamespace,omitempty"`
}
// WindowsHyperV contains information for configuring a container to run with Hyper-V isolation.
@@ -526,7 +528,7 @@ type VMHypervisor struct {
// Path is the host path to the hypervisor used to manage the virtual machine.
Path string `json:"path"`
// Parameters specifies parameters to pass to the hypervisor.
- Parameters string `json:"parameters,omitempty"`
+ Parameters []string `json:"parameters,omitempty"`
}
// VMKernel contains information about the kernel to use for a virtual machine.
@@ -534,7 +536,7 @@ type VMKernel struct {
// Path is the host path to the kernel used to boot the virtual machine.
Path string `json:"path"`
// Parameters specifies parameters to pass to the kernel.
- Parameters string `json:"parameters,omitempty"`
+ Parameters []string `json:"parameters,omitempty"`
// InitRD is the host path to an initial ramdisk to be used by the kernel.
InitRD string `json:"initrd,omitempty"`
}
@@ -621,10 +623,18 @@ type LinuxSyscall struct {
Args []LinuxSeccompArg `json:"args,omitempty"`
}
-// LinuxIntelRdt has container runtime resource constraints
-// for Intel RDT/CAT which introduced in Linux 4.10 kernel
+// LinuxIntelRdt has container runtime resource constraints for Intel RDT
+// CAT and MBA features which introduced in Linux 4.10 and 4.12 kernel
type LinuxIntelRdt struct {
+ // The identity for RDT Class of Service
+ ClosID string `json:"closID,omitempty"`
// The schema for L3 cache id and capacity bitmask (CBM)
// Format: "L3:<cache_id0>=<cbm0>;<cache_id1>=<cbm1>;..."
L3CacheSchema string `json:"l3CacheSchema,omitempty"`
+
+ // The schema of memory bandwidth per L3 cache id
+ // Format: "MB:<cache_id0>=bandwidth0;<cache_id1>=bandwidth1;..."
+ // The unit of memory bandwidth is specified in "percentages" by
+ // default, and in "MBps" if MBA Software Controller is enabled.
+ MemBwSchema string `json:"memBwSchema,omitempty"`
}
diff --git a/vendor/github.com/opencontainers/runtime-tools/README.md b/vendor/github.com/opencontainers/runtime-tools/README.md
index 11f613cf9..c9974cab5 100644
--- a/vendor/github.com/opencontainers/runtime-tools/README.md
+++ b/vendor/github.com/opencontainers/runtime-tools/README.md
@@ -87,7 +87,7 @@ make: *** [Makefile:44: localvalidation] Error 1
You can also run an individual test executable directly:
```console
-$ RUNTIME=runc validation/default.t
+$ sudo RUNTIME=runc validation/default/default.t
TAP version 13
ok 1 - has expected hostname
---
@@ -105,7 +105,7 @@ If you cannot install node-tap, you can probably run the test suite with another
For example, with [`prove`][prove]:
```console
-$ sudo make TAP='prove -Q -j9' RUNTIME=runc VALIDATION_TESTS=validation/pidfile.t localvalidation
+$ sudo make TAP='prove -Q -j9' RUNTIME=runc VALIDATION_TESTS=validation/pidfile/pidfile.t localvalidation
RUNTIME=runc prove -Q -j9 validation/pidfile.t
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.01 usr 0.01 sys + 0.03 cusr 0.03 csys = 0.08 CPU)
diff --git a/vendor/github.com/opencontainers/runtime-tools/generate/generate.go b/vendor/github.com/opencontainers/runtime-tools/generate/generate.go
index 955a9d5f9..1eb44770f 100644
--- a/vendor/github.com/opencontainers/runtime-tools/generate/generate.go
+++ b/vendor/github.com/opencontainers/runtime-tools/generate/generate.go
@@ -39,23 +39,43 @@ type ExportOptions struct {
// New creates a configuration Generator with the default
// configuration for the target operating system.
func New(os string) (generator Generator, err error) {
- if os != "linux" && os != "solaris" {
+ if os != "linux" && os != "solaris" && os != "windows" {
return generator, fmt.Errorf("no defaults configured for %s", os)
}
config := rspec.Spec{
- Version: rspec.Version,
- Root: &rspec.Root{
+ Version: rspec.Version,
+ Hostname: "mrsdalloway",
+ }
+
+ if os == "windows" {
+ config.Process = &rspec.Process{
+ Args: []string{
+ "cmd",
+ },
+ Cwd: `C:\`,
+ ConsoleSize: &rspec.Box{
+ Width: 80,
+ Height: 20,
+ },
+ }
+ config.Windows = &rspec.Windows{
+ IgnoreFlushesDuringBoot: true,
+ Network: &rspec.WindowsNetwork{
+ AllowUnqualifiedDNSQuery: true,
+ },
+ }
+ } else {
+ config.Root = &rspec.Root{
Path: "rootfs",
Readonly: false,
- },
- Process: &rspec.Process{
+ }
+ config.Process = &rspec.Process{
Terminal: false,
Args: []string{
"sh",
},
- },
- Hostname: "mrsdalloway",
+ }
}
if os == "linux" || os == "solaris" {