{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/23873","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/23873/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/23873/comments","events_url":"https://api.github.com/repos/docker/docker/issues/23873/events","html_url":"https://github.com/docker/docker/issues/23873","id":161770449,"number":23873,"title":"[1.12-rc2] Port publishing update does not work properly for services","user":{"login":"dimw","id":2025688,"avatar_url":"https://avatars.githubusercontent.com/u/2025688?v=3","gravatar_id":"","url":"https://api.github.com/users/dimw","html_url":"https://github.com/dimw","followers_url":"https://api.github.com/users/dimw/followers","following_url":"https://api.github.com/users/dimw/following{/other_user}","gists_url":"https://api.github.com/users/dimw/gists{/gist_id}","starred_url":"https://api.github.com/users/dimw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimw/subscriptions","organizations_url":"https://api.github.com/users/dimw/orgs","repos_url":"https://api.github.com/users/dimw/repos","events_url":"https://api.github.com/users/dimw/events{/privacy}","received_events_url":"https://api.github.com/users/dimw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/group/networking","name":"group/networking","color":"F6FBFF"},{"url":"https://api.github.com/repos/docker/docker/labels/version/1.12","name":"version/1.12","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/53","html_url":"https://github.com/docker/docker/milestones/1.12.0","labels_url":"https://api.github.com/repos/docker/docker/milestones/53/labels","id":1657301,"number":53,"title":"1.12.0","description":"feature/code freeze: June 14th, 2016","creator":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"open_issues":73,"closed_issues":345,"state":"open","created_at":"2016-03-21T13:47:53Z","updated_at":"2016-06-22T21:51:26Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-06-22T19:52:10Z","updated_at":"2016-06-22T22:41:21Z","closed_at":null,"body":"When updating published ports on an existing service (e.g. using `docker service update --publish=8081:80/tcp <service name>`), the Docker does not expose the the new port. However, the new port is exposed after Docker daemon is restarted.\r\n\r\n**Output of `docker version`:**\r\n\r\n```\r\nClient:\r\n Version:      1.12.0-rc2\r\n API version:  1.24\r\n Go version:   go1.6.2\r\n Git commit:   906eacd\r\n Built:\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      1.12.0-rc2\r\n API version:  1.24\r\n Go version:   go1.6.2\r\n Git commit:   906eacd\r\n Built:\r\n OS/Arch:      linux/amd64\r\n```\r\n\r\n\r\n**Output of `docker info`:**\r\n\r\n```\r\nContainers: 69\r\n Running: 4\r\n Paused: 0\r\n Stopped: 65\r\nImages: 68\r\nServer Version: 1.12.0-rc2\r\nStorage Driver: devicemapper\r\n REDACTED\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: null bridge host overlay\r\nSwarm: active\r\n NodeID: REDACTED\r\n IsManager: Yes\r\n Managers: 1\r\n Nodes: 1\r\n CACertHash: REDACTED\r\nRuntimes: default\r\nDefault Runtime: default\r\nSecurity Options: seccomp\r\nKernel Version: 3.10.0-327.18.2.el7.x86_64\r\nOperating System: CentOS Linux 7 (Core)\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 2\r\nTotal Memory: 5.671 GiB\r\nName: REDACTED\r\nID: REDACTED\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: bridge-nf-call-ip6tables is disabled\r\nInsecure Registries:\r\n 127.0.0.0/8\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\nVPS (KVM)\r\n\r\n\r\n**Steps to reproduce the issue:**\r\n\r\n1. Init Docker Swarm: \r\n    \r\n    ```\r\n    $ docker swarm init\r\n    Swarm initialized: current node (REDACTED) is now a manager.\r\n    ```\r\n\r\n2. Create a service (i.e. _frontend_) and publish a port (i.e. `8080`): \r\n\r\n    ```\r\n    $ docker service create --publish=8080:80/tcp --name=frontend nginx:latest\r\n    6uq5dqu9tvoszyx0sh8aavq0g\r\n    ```\r\n\r\n3. Wait and check whether all replicas are running:\r\n\r\n    ```\r\n    $ docker service ls\r\n    ID            NAME      REPLICAS  IMAGE         COMMAND\r\n    6uq5dqu9tvos  frontend  1/1       nginx:latest\r\n    ```\r\n\r\n4. Ensure services listen on the newly mapped port (i.e. `8080`):\r\n\r\n    ```\r\n    $ ss -lnptu | grep docker\r\n    tcp    LISTEN     0      128            10.0.2.15:7946                  *:*      users:((\"dockerd\",1735,24))\r\n    tcp    LISTEN     0      128                   :::8080                 :::*      users:((\"dockerd\",1735,39))\r\n    tcp    LISTEN     0      128                   :::2377                 :::*      users:((\"dockerd\",1735,17))\r\n    ```\r\n\r\n5. Adding publishing service on another port (i.e. `8081`):\r\n\r\n    ```\r\n    $ docker service update --publish=8081:80/tcp frontend\r\n    frontend\r\n    ```\r\n\r\n**Describe the results you received:**\r\n\r\nThe port (i.e. `8081`) mapped while the service is running is not exposed:\r\n\r\n```\r\n$ ss -lnpt | grep docker\r\ntcp    LISTEN     0      128            10.0.2.15:7946                  *:*      users:((\"dockerd\",1735,24))\r\ntcp    LISTEN     0      128                   :::8080                 :::*      users:((\"dockerd\",1735,39))\r\ntcp    LISTEN     0      128                   :::2377                 :::*      users:((\"dockerd\",1735,17))\r\n```\r\n\r\n**Describe the results you expected:**\r\n\r\nPorts published while the service is running are exposed shortly.\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\n\r\n- Newly mapped port (i.e. `8081`) is exposed after Docker daemon is restarted:\r\n\r\n    ```\r\n    $ service docker restart\r\n    docker stop/waiting\r\n    docker start/running, process 2504\r\n    $ ss -lnpt | grep docker\r\n    tcp    LISTEN     0      128            10.0.2.15:7946                  *:*      users:((\"dockerd\",2504,26))\r\n    tcp    LISTEN     0      128                   :::8080                 :::*      users:((\"dockerd\",2504,38))\r\n    tcp    LISTEN     0      128                   :::8081                 :::*      users:((\"dockerd\",2504,39))\r\n    tcp    LISTEN     0      128                   :::2377                 :::*      users:((\"dockerd\",2504,16))\r\n    ```\r\n\r\n- The issue can be also reproduced on Ubuntu 14.04.2 LTS (3.13.0-88-generic) in VirtualBox."},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/227899312","html_url":"https://github.com/docker/docker/issues/23873#issuecomment-227899312","issue_url":"https://api.github.com/repos/docker/docker/issues/23873","id":227899312,"user":{"login":"nathanleclaire","id":1476820,"avatar_url":"https://avatars.githubusercontent.com/u/1476820?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanleclaire","html_url":"https://github.com/nathanleclaire","followers_url":"https://api.github.com/users/nathanleclaire/followers","following_url":"https://api.github.com/users/nathanleclaire/following{/other_user}","gists_url":"https://api.github.com/users/nathanleclaire/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanleclaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanleclaire/subscriptions","organizations_url":"https://api.github.com/users/nathanleclaire/orgs","repos_url":"https://api.github.com/users/nathanleclaire/repos","events_url":"https://api.github.com/users/nathanleclaire/events{/privacy}","received_events_url":"https://api.github.com/users/nathanleclaire/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T22:41:21Z","updated_at":"2016-06-22T22:41:21Z","body":"I also discovered this issue and IIRC from chatting some some maintainers, this issue may be fixed on master now.  @stevvooe "}}
{"actor":{"display_login":"nathanleclaire"}}