Hi all. I want to start service in swarm with gpu resource (with nvidia runtime) and custom overlay network. So, when I’m starting service like this
docker service create --with-registry-auth --generic-resource "gpu=1" --name=test --constraint=node.id==50pbc33tbompfiiu1n61khyc5 --network=myinternal busybox:latest sh -c "while true; do echo Hello; sleep 2; done"
I’ve got error node is missing network attachments, ip addresses may be exhausted
and then assigned node no longer meets constraints
:
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
yonzgcjx8793nxf2jbuvpdukq \_ test.1 busybox:latest@sha256:d366a4665ab44f0648d7a00ae3fae139d55e32f9712c67accd604bb55df9d05a node-4 Shutdown Rejected 19 seconds ago "assigned node no longer meets constraints"
3a3wrspme0m5ureu69dd9wpju \_ test.1 busybox:latest@sha256:d366a4665ab44f0648d7a00ae3fae139d55e32f9712c67accd604bb55df9d05a node-4 Shutdown Rejected 19 seconds ago "node is missing network attachments, ip addresses may be exhausted"
Service starts ok if I remove either --network
or --generic-resource
. Overlay network myinternal
is empty (there is no other services/containers in this network) and I can’t understand how it gets exhausted. Network inspect:
docker network inspect e0fs28o8t7pq
[
{
"Name": "myinternal",
"Id": "e0fs28o8t7pqgc5p2jusa662g",
"Created": "2020-10-08T06:46:38.851827933Z",
"Scope": "swarm",
"Driver": "overlay",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "10.9.8.1/16",
"Gateway": "10.9.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": null,
"Options": {
"com.docker.network.driver.overlay.vxlanid_list": "4096"
},
"Labels": null
}
]
Where is my mistake?