moby / moby/swarmkit

service update --publish-rm unable to remove pair of ports

Open
#1,396 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.7k
Forks
676
Avg merge
4d 9h
Merged PRs (30d)
6

Description

--publish-rm 82:80 fails when I published before with the same port pair. Full commands are:

docker service update --publish-add 80:80 root_nginx
docker service update --publish-add 81:80 root_nginx
docker service update --publish-rm 81:80 root_nginx

I'd expect that only 80:80 is left, but the only thing that works is --publish-rm 80 but that removes both bindings instead of only one. Probably removing only single binding pair is not implemented.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the three docker service update commands and inspect the service-update handling for --publish-add and --publish-rm. Trace how a port pair is identified for removal and add a regression test if the relevant test area is found. Done means removing 81:80 leaves 80:80 published while retaining the existing single-port removal behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli, distributed-systems, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.