Open kirinnee opened 4 years ago
Bug replicated on Ubuntu 18.04 over AWS.
Output of docker version
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: afacb8b7f0
Built: Wed Mar 11 01:25:46 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: afacb8b7f0
Built: Wed Mar 11 01:24:19 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
Output of docker info
Client:
Debug Mode: false
Server:
Containers: 3
Running: 3
Paused: 0
Stopped: 0
Images: 1
Server Version: 19.03.8
Storage Driver: overlay2
Backing Filesystem: <unknown>
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: active
NodeID: fbu6eociz4v21stwhg0yffpuk
Is Manager: true
ClusterID: xzg06pe2ne4yw6ooaetvx42rl
Managers: 1
Nodes: 1
Default Address Pool: 10.0.0.0/8
SubnetSize: 24
Data Path Port: 4789
Orchestration:
Task History Retention Limit: 5
Raft:
Snapshot Interval: 10000
Number of Old Snapshots to Retain: 0
Heartbeat Tick: 1
Election Tick: 10
Dispatcher:
Heartbeat Period: 5 seconds
CA Configuration:
Expiry Duration: 3 months
Force Rotate: 0
Autolock Managers: false
Root Rotation In Progress: false
Node Address: 172.31.25.47
Manager Addresses:
172.31.25.47:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-1065-aws
Operating System: Ubuntu 18.04.4 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 983.7MiB
Name: ip-172-31-25-47
ID: CALI:Y7RD:PIX5:H3CD:K62C:IVJH:ASKJ:THDQ:77B7:66VB:JUJ3:5V27
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Description
docker stack deploy <app>
with the flag--resolve-image changed
does not update port-mapping in theports
section of the YAML file if the image does not change. However,docker service ls
reflects the new port-mapping incorrectlySteps to reproduce the issue:
Use a simple application that publish HTTP server on port 8000 :
stack.yml
Run the command:
docker stack deploy --prune --with-registry-auth --compose-file stack.yml --resolve-image changed app
to deploy the stackRun
docker service ls
to check the stack deployedas we can see, the app is deployed on port 8000 and mapped to host's port 8000.
We can check is by running
curl http://localhost:8000
Now we re-deploy by changing the port mapping:
stack.yml
Run
docker service ls
to check the stack deployedas we can see, the app is deployed on port 8000 and mapped to host's port 7000.
We can wait a minute or so, but when we run
curl http://localhost:7000
, there will be responseDescribe the results you received: When curling
http://localhost:7000
:was recieved
When curling
http://localhost:8000
:was recieved
Describe the results you expected:
When curling
http://localhost:7000
:was expected
When curling
http://localhost:8000
:was expected
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.): Windows 10, physical.