New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct create.go's failure to detect WSL2 kernel's compiled-in swap capabilities #43674
Comments
Was there a specific reason you're using |
Looks like that PR fixed a regression on "master" (which was introduced in #43347, and not in the 20.10 release), so if the issue is in docker 20.10, that fix likely will be different. |
Hey @thaJeztah 👋 Thank you for engaging so promptly 👍
My employer requires them for some kind of internal accounting of access to links to certain kinds of internet resources. I wasn't told — and don't understand — their strategic rationale for that particular tracking mechanism. Even if I did know though, I presume I'd be contractually bound to not reveal specifics of internal practices publicly. |
Hmm... that's a bit of an odd policy, as effectively it means users that want to read your report must accept to visit an "unknown" link, and to accept it's tracked by your company 🤔 |
I edited the description to make the |
Since nothing stops me from unmasking the links: |
I think I might be getting warmer, @thaJeztah. I've done a very cursory reading of the following two blocks of moby code…
My, admittedly, very naive intepretation so far of those two blocks of code is…
Please correct me if my interpretation is wrong, though. I hope it is, anyway. TIA. — 1 Sh!t Out o' Luck _ |
Hey @thaJeztah , does daemon.NewDaemon(): fix network feature detection on first start impact, in any way, the behavior reported in this issue…
❔ ❔ ❔ |
That fix was addressing a regression on master (not in the 20.10 branch, or any release) |
Fixes moby#43674 To stop the display of the spurious warning reported in moby#43674, I propose the following solutions: - Refactor daemon.getSwapLimitV2() to make it testable - Detect the kernel's actual swap support My best guess for what the root cause of the defect might be: - The previous implementation assumes it will *never* be running in the root cgroup The general idea behind what this refactored implementation and its tests codify: - Root cgroup use cases should be taken into consideration whenever attempting to detect the kernel's swap support —— Signed-off-by: Randi Sheaffer-Klass <hgyao63bn@mozmail.com>
Description
Docker fails to detect the swap capabilities of a Windows Subsystem for Linux (WSL2) kernel running Alpine Linux.
My WSL2 kernel has cgroup v2 and swap capabilities enabled.1
Although
docker info
correctly detects and reports the cgroup v2 info,docker run -m 1024m --memory-swap 1024m
, however, evidently fails to detect the kernel's swap capabilities.Steps to reproduce the issue:
Describe the results you received:
The first thirty, forty seconds of this recording illustrate the occurrence of the misdiagnosed
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap
…3Describe the results you expected:
docker run
, executed on a cgroup v2-configured kernel with swap capabilities compiled in, should not print,WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap
.Additional information you deem important (e.g. issue happens only occasionally):
5.10.102.1-microsoft-standard-WSL2
kernel does, indeed, support swap limit capabilitiessystemd
4WARNING: No swap limit support
that's observed indocker info
outputTangential info:
…kernel does not support swap limit capabilities or the cgroup is not mounted…
warning too?WARNING
ContainerCreate()
https://bit.ly/ContainerCreateSystemConfig()
https://bit.ly/SysConfigMemoryLimit
https://bit.ly/MemoryLimitOutput of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Alpine Linux v3.15 in Windows Subsystem for Linux (WSL) 2 on a Windows 10 physical host
—
1 _Kernel config for MS 5.10.x WSL2 showing kernel is compiled with swap capabilities
CONFIG_MEMCG_SWAP=y
https://bit.ly/confMemCGSwap _2 To reproduce the
WARNING
, the process in whichdocker run
is executed MUST be in the root cgroup3 Illustrates a reproducer for an issue reported in the
crun
project4 Considering
systemd
as a dependency is off the tableThe text was updated successfully, but these errors were encountered: