ContainerStart must run sequentially for engine to assing distinct ports within configured range#10067
Conversation
…rts within configured range Signed-off-by: Nicolas De Loof <[email protected]>
Codecov ReportBase: 75.74% // Head: 77.02% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## v2 #10067 +/- ##
==========================================
+ Coverage 75.74% 77.02% +1.27%
==========================================
Files 2 2
Lines 235 235
==========================================
+ Hits 178 181 +3
+ Misses 50 48 -2
+ Partials 7 6 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
glours
left a comment
There was a problem hiding this comment.
LGTM, I'm little bit sad to see this move but I definitely prefer lower perf than port collisions 🤷♂️
|
Is there a solution for compose V3 without adding containerized NGINX, for example? |
|
I am still getting the port mapping error on windows. Here is the version: is it fixed for above version? |
What I did
A service configured with
port: 6000-6010:80will get a random port assigned within this rangeAs we invoke
ContainerStart, engine select an available port within container's config port range.If we invoke those concurrently for containers within same service, engine will fail to assign a distinct port.
Arguably, engine should manage concurrent access and prevent this to happen, but .. ¯\(ツ)/
Related issue
fixes #8530
(not mandatory) A picture of a cute animal, if possible in relation to what you did
