-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
[1.12] docker service update --publish-rm "[port]:[port]" does not unpublish ports #25200
Comments
From the usage text:
The important bit is target port. So |
That doesn't seem to be working either:
|
I noticed something interesting. If your service is in an overlay network this functionality works fine, but if you didn't specify the network and only have ingress it won't. |
Wow, yep. Great catch @jhorwit2. I just verified:
|
I can reproduce this. There don't seem to be any errors generated. I'm am investigating the problem. |
Fixes moby/moby#25200. This change should trigger an allocation when the service has ports attached but the spec says none should be. Signed-off-by: Drew Erny <drew.erny@docker.com>
Fixes moby/moby#25200. This change should trigger an allocation when the service has ports attached but the spec says none should be. Signed-off-by: Drew Erny <drew.erny@docker.com> (cherry picked from commit 5982397)
ping @mrjana @dperny I'm reopening this, because the change in SwarmKit was not vendored yet; could you make sure to add a "closes" in the vendor bump PR that brings in moby/swarmkit#1301 ? |
er, @vdemeester looks like this auto-closed from your repository 😂 |
wat ? 😅 😂 😱 |
moby/swarmkit#1301 is there now. |
Third time lucky! |
…TargetPort>` Currently `--publish-rm` only accepts `<TargetPort>` or `<TargetPort>[/Protocol]` though there are some confusions. Since `--publish-add` accepts `<PublishedPort>:<TargetPort>[/Protocol]`, some user may provide `--publish-rm 80:80`. However, there is no error checking so the incorrect provided argument is ignored silently. This fix adds the check to make sure `--publish-rm` only accepts `<TargetPort>[/Protocol]` and returns error if the format is invalid. The `--publish-rm` itself may needs to be revisited to have a better UI/UX experience, see discussions on: moby/swarmkit#1396 moby#25200 (comment) moby#25338 (comment) This fix is short term measure so that end users are not misled by the silently ignored error of `--publish-rm`. This fix is related to (but is not a complete fix): moby/swarmkit#1396 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
…TargetPort>` Currently `--publish-rm` only accepts `<TargetPort>` or `<TargetPort>[/Protocol]` though there are some confusions. Since `--publish-add` accepts `<PublishedPort>:<TargetPort>[/Protocol]`, some user may provide `--publish-rm 80:80`. However, there is no error checking so the incorrect provided argument is ignored silently. This fix adds the check to make sure `--publish-rm` only accepts `<TargetPort>[/Protocol]` and returns error if the format is invalid. The `--publish-rm` itself may needs to be revisited to have a better UI/UX experience, see discussions on: moby/swarmkit#1396 moby#25200 (comment) moby#25338 (comment) This fix is short term measure so that end users are not misled by the silently ignored error of `--publish-rm`. This fix is related to (but is not a complete fix): moby/swarmkit#1396 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
…TargetPort>` Currently `--publish-rm` only accepts `<TargetPort>` or `<TargetPort>[/Protocol]` though there are some confusions. Since `--publish-add` accepts `<PublishedPort>:<TargetPort>[/Protocol]`, some user may provide `--publish-rm 80:80`. However, there is no error checking so the incorrect provided argument is ignored silently. This fix adds the check to make sure `--publish-rm` only accepts `<TargetPort>[/Protocol]` and returns error if the format is invalid. The `--publish-rm` itself may needs to be revisited to have a better UI/UX experience, see discussions on: moby/swarmkit#1396 moby/moby#25200 (comment) moby/moby#25338 (comment) This fix is short term measure so that end users are not misled by the silently ignored error of `--publish-rm`. This fix is related to (but is not a complete fix): moby/swarmkit#1396 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
…TargetPort>` Currently `--publish-rm` only accepts `<TargetPort>` or `<TargetPort>[/Protocol]` though there are some confusions. Since `--publish-add` accepts `<PublishedPort>:<TargetPort>[/Protocol]`, some user may provide `--publish-rm 80:80`. However, there is no error checking so the incorrect provided argument is ignored silently. This fix adds the check to make sure `--publish-rm` only accepts `<TargetPort>[/Protocol]` and returns error if the format is invalid. The `--publish-rm` itself may needs to be revisited to have a better UI/UX experience, see discussions on: moby/swarmkit#1396 moby/moby#25200 (comment) moby/moby#25338 (comment) This fix is short term measure so that end users are not misled by the silently ignored error of `--publish-rm`. This fix is related to (but is not a complete fix): moby/swarmkit#1396 Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: 8597e231a5caa23247934f7a89c1001d87e26192 Component: cli
…TargetPort>` Currently `--publish-rm` only accepts `<TargetPort>` or `<TargetPort>[/Protocol]` though there are some confusions. Since `--publish-add` accepts `<PublishedPort>:<TargetPort>[/Protocol]`, some user may provide `--publish-rm 80:80`. However, there is no error checking so the incorrect provided argument is ignored silently. This fix adds the check to make sure `--publish-rm` only accepts `<TargetPort>[/Protocol]` and returns error if the format is invalid. The `--publish-rm` itself may needs to be revisited to have a better UI/UX experience, see discussions on: moby/swarmkit#1396 moby/moby#25200 (comment) moby/moby#25338 (comment) This fix is short term measure so that end users are not misled by the silently ignored error of `--publish-rm`. This fix is related to (but is not a complete fix): moby/swarmkit#1396 Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: 1b400f6284b17fffa0495e1c801155fdd0716e98 Component: cli
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Digital ocean. Single droplet as the manager in a single-node swarm.
Steps to reproduce the issue:
Create a droplet on digital ocean with
docker-machine
Create a swarm
Create a service with 10 replicas, but no publish port
Add a publish port of "80:80", and run inspect to verify the port has been added:
Remove the publish port:
Describe the results you received:
If I run inspect again, port 80 still appears to be assigned to the service:
If I subsequently try to re-add the port, I get this error:
Describe the results you expected:
I expected the ports to be unpublished from the service.
The text was updated successfully, but these errors were encountered: