Synchronise vendoring with containerd v1.0.0-alpha1

Some of these are arbitrary and just syncing for the sake of it, however the
image- and runtime-spec are relevant. Interesting changes:

- runtime spec:
  - LinuxRLimit is now POSIXRLimit.
  - Specs.Config is now a pointer.
  - LinuxResources.DisableOOMKiller moved to
    LinuxResources.LinuxMemory.DisableOOMKiller
- image spec:
  - Platform.Features is removed (unused here).

Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
Ian Campbell
2017-07-20 11:01:40 +01:00
parent dec42921d7
commit e8d5005b0e
54 changed files with 592 additions and 240 deletions

View File

@@ -768,7 +768,7 @@ func ConfigInspectToOCI(yaml Image, inspect types.ImageInspect, idMap map[string
}
rlimitsString := assignStrings(label.Rlimits, yaml.Rlimits)
rlimits := []specs.LinuxRlimit{}
rlimits := []specs.POSIXRlimit{}
for _, limitString := range rlimitsString {
rs := strings.SplitN(limitString, ",", 3)
var limit string
@@ -818,7 +818,7 @@ func ConfigInspectToOCI(yaml Image, inspect types.ImageInspect, idMap map[string
"RLIMIT_NICE",
"RLIMIT_RTPRIO",
"RLIMIT_RTTIME":
rlimits = append(rlimits, specs.LinuxRlimit{Type: limit, Soft: soft, Hard: hard})
rlimits = append(rlimits, specs.POSIXRlimit{Type: limit, Soft: soft, Hard: hard})
default:
return oci, fmt.Errorf("Unknown limit: %s", origLimit)
}
@@ -876,7 +876,7 @@ func ConfigInspectToOCI(yaml Image, inspect types.ImageInspect, idMap map[string
// SelinuxLabel
}
oci.Root = specs.Root{
oci.Root = &specs.Root{
Path: "rootfs",
Readonly: readonly,
}
@@ -890,8 +890,15 @@ func ConfigInspectToOCI(yaml Image, inspect types.ImageInspect, idMap map[string
Sysctl: assignMaps(label.Sysctl, yaml.Sysctl),
Resources: &specs.LinuxResources{
// Devices
DisableOOMKiller: assignBoolPtr(label.DisableOOMKiller, yaml.DisableOOMKiller),
// Memory
Memory: &specs.LinuxMemory{
// Limit
// Reservation
// Swap
// Kernel
// KernelTCP
// Swappiness
DisableOOMKiller: assignBoolPtr(label.DisableOOMKiller, yaml.DisableOOMKiller),
},
// CPU
// Pids
// BlockIO