You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You have a swarm with windows and linux nodes - sometimes referred to as "hybrid swarm"
Each node has an SMB file share mapped:
to x:/ on windows nodes
to /x on linux nodes
Note: using a file share to replicate this issue may not actually be necessary but its what I tested with.
Then when the leader is a linux node
You can't docker stack deploy a stack with a windows container that bind mounts from x:/ - the swarm complains its an invalid source path for the bind mount.
Yet you can deploy a stack with a linux container that bind mounts from /x successfully.
It doesn't matter if you execute the docker stack deploy command on a windows manager node or a linux manager node, whilst the leader is a linux node, bind mounting of windows paths like x:/ will fail.
If you force the leader to be a windows node (i.e by demoting / promoting), you can now successfully docker stack deploy the windows container image that bind mounts from x:/ however now you are in a position where you can't deploy linux containers that bind mount from /x.
The result is, if you want to use windows and linux containers, that both bind mount from SMB file shares mounted on them, your deployment routine has to force an appropriate leader before attempting the docker stack deploy - which is not very great as it shouldn't matter what the leader is, and having to force a new leader for a deplyment means demoting all managers except the one you want to lead which obviously is not good!
Describe the results you received:
You can see much more detail about the results I received and the test I ran originally before I knew the leader effected the outcome. See this: #34997 (comment)
Describe the results you expected:
I expected to be able to deploy windows containers and linux containers to the swarm, where both can successfully bind mount from the host they are placed on, irrespective of whether the leader is linux or windows platform.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version:
Client:
Cloud integration: 1.0.17
Version: 20.10.8
API version: 1.41
Go version: go1.16.6
Git commit: 3967b7d
Built: Fri Jul 30 19:58:50 2021
OS/Arch: windows/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.8
API version: 1.41 (minimum version 1.24)
Go version: go1.16.6
Git commit: 75249d8
Built: Fri Jul 30 19:54:29 2021
OS/Arch: windows/amd64
Experimental: true
Output of docker info:
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Build with BuildKit (Docker Inc., v0.6.1-docker)
compose: Docker Compose (Docker Inc., v2.0.0-rc.2)
scan: Docker Scan (Docker Inc., v0.8.0)
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 1
Server Version: 20.10.8
Storage Driver: windowsfilter (windows) lcow (linux)
Windows:
LCOW:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: active
NodeID: w6gts6jf44gdgcjfwko57ssan
Is Manager: true
ClusterID: chlz13kcglzuozrpbbu4oddrf
Managers: 1
Nodes: 3
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: 10.1.0.4
Manager Addresses:
10.1.0.4:2377
Default Isolation: hyperv
Kernel Version: 10.0 19043 (19041.1.amd64fre.vb_release.191206-1406)
Operating System: Windows 10 Pro Version 2009 (OS Build 19043.1165)
OSType: windows
Architecture: x86_64
CPUs: 2
Total Memory: 8GiB
Name: swarm-1
ID: MKGD:LP7S:4Z3O:4UYA:RI4M:DRIE:OGUA:QKOK:MWJJ:JK6O:CELC:WVRW
Docker Root Dir: C:\ProgramData\Docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Description
Given:
x:/
on windows nodes/x
on linux nodesThen when the
leader
is a linux nodeYou can't
docker stack deploy
a stack with a windows container that bind mounts fromx:/
- the swarm complains its an invalid source path for the bind mount.Yet you can deploy a stack with a linux container that bind mounts from
/x
successfully.It doesn't matter if you execute the
docker stack deploy
command on a windows manager node or a linux manager node, whilst theleader
is a linux node, bind mounting ofwindows
paths likex:/
will fail.If you force the leader to be a windows node (i.e by demoting / promoting), you can now successfully
docker stack deploy
the windows container image that bind mounts fromx:/
however now you are in a position where you can't deploy linux containers that bind mount from/x
.The result is, if you want to use windows and linux containers, that both bind mount from SMB file shares mounted on them, your deployment routine has to force an appropriate leader before attempting the
docker stack deploy
- which is not very great as it shouldn't matter what the leader is, and having to force a new leader for a deplyment means demoting all managers except the one you want to lead which obviously is not good!Describe the results you received:
You can see much more detail about the results I received and the test I ran originally before I knew the
leader
effected the outcome. See this: #34997 (comment)Describe the results you expected:
I expected to be able to deploy windows containers and linux containers to the swarm, where both can successfully bind mount from the host they are placed on, irrespective of whether the leader is linux or windows platform.
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.):
The text was updated successfully, but these errors were encountered: