for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Docker stack deploy fails on Docker for Windows when redeploying

Open itscaro opened this issue 8 years ago • 12 comments

Description

I'm using relative path in YML file, the first deploy works but if I re-run the deploy command, there is error about bindings.

Describe the results you received:

workspace master *% = $ docker stack deploy workspace --compose-file docker-compose.yml
Creating network workspace_network
Creating service workspace_traefik
Creating service workspace_portainer
Creating service workspace_dns

workspace master *% = $ docker service ps workspace_portainer --no-trunc
ID                          NAME                    IMAGE                                                                                                NODE                    DESIRED STATE       CURRENT STATE            ERROR               PORTS
pshqd8it2marsj375dpcbs8lf   workspace_portainer.1   portainer/portainer:latest@sha256:261d02375566fd24f3fc0fb358bb5e4c394d82b3e44efb77e1609dd01c3d4369   linuxkit-00155d0113b2   Running             Running 14 seconds ago      
               
workspace master *% = $ docker stack deploy workspace --compose-file docker-compose.yml
Updating service workspace_portainer (id: uvgjobyi0bz5vnrkb8qu96ek8)
Updating service workspace_dns (id: ul1g12pcgli155xcwwykkftp4)
Updating service workspace_traefik (id: qysw7mce8kyppdaplab3pt16a)

workspace master *% = $ docker service ps workspace_portainer --no-trunc
ID                          NAME                        IMAGE                                                                                                NODE                    DESIRED STATE       CURRENT STATE            ERROR                                                                                                 PORTS
royimf2e34m2bczsuacmzm0bq    \_ workspace_portainer.1   portainer/portainer:latest@sha256:261d02375566fd24f3fc0fb358bb5e4c394d82b3e44efb77e1609dd01c3d4369   linuxkit-00155d0113b2   Shutdown            Rejected 7 seconds ago   "invalid bind mount source, must be an absolute path: C:\Users\user\workspace\workspace\portainer"
pshqd8it2marsj375dpcbs8lf    \_ workspace_portainer.1   portainer/portainer:latest@sha256:261d02375566fd24f3fc0fb358bb5e4c394d82b3e44efb77e1609dd01c3d4369   linuxkit-00155d0113b2   Shutdown            Shutdown 3 seconds ago  

1st deploy : the path is translated to Linux equivalent

"Mounts": [
                        {
                            "Type": "bind",
                            "Source": "/var/run/docker.sock",
                            "Target": "/var/run/docker.sock"
                        },
                        {
                            "Type": "bind",
                            "Source": "/host_mnt/c/Users/itsca/workspace/workspace/portainer",
                            "Target": "/data"
                        }
                    ],

2nd deploy: the path is not translated to Linux equivalent

"Mounts": [
                        {
                            "Type": "bind",
                            "Source": "/var/run/docker.sock",
                            "Target": "/var/run/docker.sock"
                        },
                        {
                            "Type": "bind",
                            "Source": "C:\\Users\\user\\workspace\\workspace\\portainer",
                            "Target": "/data"
                        }
                    ],

Describe the results you expected:

The service should continue to work.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
 Version:       17.12.0-ce
 API version:   1.35
 Go version:    go1.9.2
 Git commit:    c97c6d6
 Built: Wed Dec 27 20:05:22 2017
 OS/Arch:       windows/amd64

Server:
 Engine:
  Version:      17.12.0-ce
  API version:  1.35 (minimum version 1.12)
  Go version:   go1.9.2
  Git commit:   c97c6d6
  Built:        Wed Dec 27 20:12:29 2017
  OS/Arch:      linux/amd64
  Experimental: true

Output of docker info:

Containers: 73
 Running: 10
 Paused: 0
 Stopped: 63
Images: 540
Server Version: 17.12.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 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 logentries splunk syslog
Swarm: active
 NodeID: mlxv4tngs919snf1m4e9eisot
 Is Manager: true
 ClusterID: 75wz6iktsi3419gd5g5mbidwx
 Managers: 1
 Nodes: 1
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 3
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 0
 Autolock Managers: false
 Root Rotation In Progress: false
 Node Address: 192.168.65.2
 Manager Addresses:
  192.168.65.2:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.60-linuxkit-aufs
Operating System: Docker for Windows
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.837GiB
Name: linuxkit-00155d0113b2
ID: 4CBV:ZYXE:RATR:L4DJ:52TE:BDGS:MJVW:KLPJ:BBII:6D25:A54G:ONXP
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 134
 Goroutines: 341
 System Time: 2018-01-10T10:26:34.2539635Z
 EventsListeners: 12
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
 registry.access.redhat.com
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.): Docker for Windows

https://github.com/moby/moby/issues/35974

itscaro avatar Jan 10 '18 13:01 itscaro

Also reported in https://github.com/docker/for-win/issues/1341 and https://github.com/moby/moby/issues/34997

Lucas-C avatar Mar 14 '18 15:03 Lucas-C

Any updates? Having the same problem on Windows 10.

Version 18.03.1-ce-win65 (17513) Channel: stable 93354b3

kpko avatar Jun 12 '18 16:06 kpko

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

docker-robott avatar Sep 10 '18 04:09 docker-robott

Same problem here.

GCSBOSS avatar Sep 18 '18 13:09 GCSBOSS

The problem persist with docker engine 18.09 / docker 2.0.0.0 - any plans to have this fixed?

HitkoDev avatar Sep 19 '18 11:09 HitkoDev

I can confirm that I experience the same problem!

larsw avatar Oct 15 '18 13:10 larsw

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

docker-robott avatar Jan 13 '19 02:01 docker-robott

similar issue here +1

iojancode avatar Feb 04 '19 18:02 iojancode

I have the same issue. Any plans to fix?

speller avatar Jun 02 '19 09:06 speller

Same issue here... this is not good :( --- Even the suggested workarounds using /host_mnt/c/... didn't work for me. Is the workaround here to deploy to a windows manager in the swarm cluster?

Drewster727 avatar Jul 07 '19 23:07 Drewster727

I have the same issue.

There is a possibility to avoid the problem. Not the perfect, but better than nothing. So, if I have to redeploy the stack, I just remove every service with mounts, than redeploy the stack.

dennismeissel avatar Nov 18 '19 15:11 dennismeissel

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked

docker-robott avatar Jun 25 '20 03:06 docker-robott