mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #43277 from thaJeztah/fix_kernelmem_docs_and_error
api: add missing docs for KernelMemoryTCP, and fix error message
This commit is contained in:
commit
36ec581e5c
4 changed files with 25 additions and 1 deletions
|
@ -4468,6 +4468,14 @@ definitions:
|
||||||
> `kmem.limit_in_bytes`.
|
> `kmem.limit_in_bytes`.
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
example: true
|
example: true
|
||||||
|
KernelMemoryTCP:
|
||||||
|
description: |
|
||||||
|
Indicates if the host has kernel memory TCP limit support enabled.
|
||||||
|
|
||||||
|
Kernel memory TCP limits are not supported when using cgroups v2, which
|
||||||
|
does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup.
|
||||||
|
type: "boolean"
|
||||||
|
example: true
|
||||||
CpuCfsPeriod:
|
CpuCfsPeriod:
|
||||||
description: |
|
description: |
|
||||||
Indicates if CPU CFS(Completely Fair Scheduler) period is supported by
|
Indicates if CPU CFS(Completely Fair Scheduler) period is supported by
|
||||||
|
|
|
@ -452,7 +452,7 @@ func verifyPlatformContainerResources(resources *containertypes.Resources, sysIn
|
||||||
resources.KernelMemory = 0
|
resources.KernelMemory = 0
|
||||||
}
|
}
|
||||||
if resources.KernelMemory > 0 && resources.KernelMemory < linuxMinMemory {
|
if resources.KernelMemory > 0 && resources.KernelMemory < linuxMinMemory {
|
||||||
return warnings, fmt.Errorf("Minimum kernel memory limit allowed is 4MB")
|
return warnings, fmt.Errorf("Minimum kernel memory limit allowed is 6MB")
|
||||||
}
|
}
|
||||||
if resources.KernelMemory > 0 && !kernel.CheckKernelVersion(4, 0, 0) {
|
if resources.KernelMemory > 0 && !kernel.CheckKernelVersion(4, 0, 0) {
|
||||||
warnings = append(warnings, "You specified a kernel memory limit on a kernel older than 4.0. Kernel memory limits are experimental on older kernels, it won't work as expected and can cause your system to be unstable.")
|
warnings = append(warnings, "You specified a kernel memory limit on a kernel older than 4.0. Kernel memory limits are experimental on older kernels, it won't work as expected and can cause your system to be unstable.")
|
||||||
|
|
|
@ -4346,6 +4346,14 @@ definitions:
|
||||||
description: "Indicates if the host has kernel memory limit support enabled."
|
description: "Indicates if the host has kernel memory limit support enabled."
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
example: true
|
example: true
|
||||||
|
KernelMemoryTCP:
|
||||||
|
description: |
|
||||||
|
Indicates if the host has kernel memory TCP limit support enabled.
|
||||||
|
|
||||||
|
Kernel memory TCP limits are not supported when using cgroups v2, which
|
||||||
|
does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup.
|
||||||
|
type: "boolean"
|
||||||
|
example: true
|
||||||
CpuCfsPeriod:
|
CpuCfsPeriod:
|
||||||
description: |
|
description: |
|
||||||
Indicates if CPU CFS(Completely Fair Scheduler) period is supported by
|
Indicates if CPU CFS(Completely Fair Scheduler) period is supported by
|
||||||
|
|
|
@ -4467,6 +4467,14 @@ definitions:
|
||||||
> `kmem.limit_in_bytes`.
|
> `kmem.limit_in_bytes`.
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
example: true
|
example: true
|
||||||
|
KernelMemoryTCP:
|
||||||
|
description: |
|
||||||
|
Indicates if the host has kernel memory TCP limit support enabled.
|
||||||
|
|
||||||
|
Kernel memory TCP limits are not supported when using cgroups v2, which
|
||||||
|
does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup.
|
||||||
|
type: "boolean"
|
||||||
|
example: true
|
||||||
CpuCfsPeriod:
|
CpuCfsPeriod:
|
||||||
description: |
|
description: |
|
||||||
Indicates if CPU CFS(Completely Fair Scheduler) period is supported by
|
Indicates if CPU CFS(Completely Fair Scheduler) period is supported by
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue