mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
api: deprecate KernelMemoryTCP support
Starting with kernel v6.12, kernel memory TCP accounting is deprecated for cgroups v1.
Note: kernel memory TCP accounting is not supported by cgroups v2.
See d046ff46ee
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
committed by
Sebastiaan van Stijn
parent
9a97f59e6e
commit
fb2f8115c8
@@ -34,7 +34,7 @@ func (daemon *Daemon) fillPlatformInfo(ctx context.Context, v *system.Info, sysI
|
||||
if v.CgroupDriver != cgroupNoneDriver {
|
||||
v.MemoryLimit = sysInfo.MemoryLimit
|
||||
v.SwapLimit = sysInfo.SwapLimit
|
||||
v.KernelMemoryTCP = sysInfo.KernelMemoryTCP
|
||||
v.KernelMemoryTCP = sysInfo.KernelMemoryTCP //nolint:staticcheck // ignore SA1019: memory.KernelTCP is deprecated: kernel memory tcp accounting is not supported in cgroups v2, and has been deprecated in [kernel v6.12]. This field should no longer be used, as it may be ignored by runtimes.
|
||||
v.OomKillDisable = sysInfo.OomKillDisable
|
||||
v.CPUCfsPeriod = sysInfo.CPUCfs
|
||||
v.CPUCfsQuota = sysInfo.CPUCfs
|
||||
@@ -93,7 +93,7 @@ func (daemon *Daemon) fillPlatformInfo(ctx context.Context, v *system.Info, sysI
|
||||
if !v.SwapLimit {
|
||||
v.Warnings = append(v.Warnings, "WARNING: No swap limit support")
|
||||
}
|
||||
if !v.KernelMemoryTCP && v.CgroupVersion == "1" {
|
||||
if !v.KernelMemoryTCP && v.CgroupVersion == "1" { //nolint:staticcheck // ignore SA1019: memory.KernelTCP is deprecated: kernel memory tcp accounting is not supported in cgroups v2, and has been deprecated in [kernel v6.12]. This field should no longer be used, as it may be ignored by runtimes.
|
||||
// kernel memory is not available for cgroup v2.
|
||||
// Warning is not printed on cgroup v2, because there is no action user can take.
|
||||
v.Warnings = append(v.Warnings, "WARNING: No kernel memory TCP limit support")
|
||||
|
||||
Reference in New Issue
Block a user