-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: util/network: add option not to re-use namespaces from pool #5686
base: master
Are you sure you want to change the base?
Conversation
There is an issue with `HnsEndpoints` on WS2019, after first time use, they can't be re-attached. See moby#5668. HCS CreateComputeSystem fails with: ``` The requested operation for attach namespace failed. ``` As a work-around, have an option for PoolSize=-1 to turn off the namespace pooling functionality and have each namespace only be used once and discarded. To enable this, you run buildkit with the additional flag: `--containerd-cni-pool-size=-1`. Fixes moby#5668 Signed-off-by: Anthony Nandaa <[email protected]>
I was able to build and test this today. I can confirm it works as expected, no namespace reuse and the build succeeds. Log excerpts from a test with and without the pool size set are below. One comment on the PR, is there any reason to purposefully restrict this to Windows only? While I understand this is mostly a bug around Server 2019, it's possible people may want to disable the cache entirely for other reasons. Possibly NAT IP contention, especially if they're not frequently building images they may want to leave the pool space available. Dockerfile tested: FROM mcr.microsoft.com/dotnet/runtime:8.0-windowsservercore-ltsc2019
SHELL ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell", "-NonInteractive", "-NoProfile", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN ipconfig /all
RUN nslookup google.com
RUN ping google.com
ENTRYPOINT ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell", "-Command", "$sec = Get-Random -Minimum 10 -Maximum 100 ; Write-Host $sec ; Start-Sleep -Seconds $sec"] No pool size setting:
Setting
|
There is an issue with
HnsEndpoints
on WS2019, after first time use, they can't be re-attached. See #5668. HCS CreateComputeSystem fails with:As a work-around, have an option for PoolSize=-1 to turn off the namespace pooling functionality and have each namespace only be used once and discarded.
To enable this, you run buildkit with the additional flag:
--containerd-cni-pool-size=-1
.Fixes #5668