-
Notifications
You must be signed in to change notification settings - Fork 615
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
controlapi: Allow multiple randomly assigned published ports on service #1657
Conversation
@@ -165,6 +165,10 @@ func validateEndpointSpec(epSpec *api.EndpointSpec) error { | |||
|
|||
portSet := make(map[portSpec]struct{}) | |||
for _, port := range epSpec.Ports { | |||
if port.PublishedPort == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need a comment? (e.g., if no host port is assigned, ports can never conflict)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment.
Thanks @aaronlehmann, makes sense that this is the issue (I was thinking way to complicated 😄) |
Current coverage is 56.77% (diff: 100%)@@ master #1657 diff @@
==========================================
Files 90 90
Lines 14574 14567 -7
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 8280 8270 -10
- Misses 5207 5213 +6
+ Partials 1087 1084 -3
|
This fixes a 1.12.2 regression. Signed-off-by: Aaron Lehmann <[email protected]>
33c3a1a
to
5d1faa8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This fixes a 1.12.2 regression.
See moby/moby#27469
cc @thaJeztah @allencloud