Skip to content

[cgroup2] docker info: SwapLimit = true is set without checking #41926

@AkihiroSuda

Description

@AkihiroSuda

Description

https://github.com/moby/moby/blob/v20.10.2/pkg/sysinfo/cgroup2_linux.go#L69-L84

info.SwapLimit = true should be set only if memory.swap.max exists.

When the swap support is present (with swapaccount=1 in kernel cmdline), memory.swap.max appears in a non-top cgroup.
i.e., /sys/fs/cgroup/${dockerd_cgroup}/memory.swap.max appears, but /sys/fs/cgroup/memory.swap.max does not appear (unless we are in dind)

Related: https://github.com/containers/podman/pull/8197/files

** docker version **
20.10.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/cgroup2cgroup v2exp/beginnerkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions