compose file option discrete_resource_spec fails with "assigned node no longer meets constraints"
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
The service deployment of a compose file defined with the following definition fails with status "assigned node no longer meets constraints" while the cli does not fail
version: "3.5"
services:
nvidia-test:
image: nvidia/cuda
command: nvidia-smi -l
deploy:
resources:
reservations:
generic_resources:
- discrete_resource_spec:
kind: 'gpu'
value: 2
steps to reproduce
I defined multiple node generic resources named gpu with flags --node-generic-resource gpu=xxxx --node-generic-resource gpu=yyyy
running docker node inspect I can see the defined NamedResourceSpec s
If I run the following command the service is up and running:
docker service create --name my-nvidia-service --generic-resource "gpu=1" nvidia/cuda nvidia-smi -l
but if I do: docker stack deploy --compose-file nvidia-stack.yml my-nvidia-stack
the service does not start with status "assigned node no longer meets constraints"
docker version 18.09.4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the docker stack deploy --compose-file path and compare its handling of the shown generic_resources definition with docker service create --generic-resource. Use docker node inspect to verify the NamedResourceSpec values and reproduce the differing scheduling behavior on Docker 18.09.4. Done means the compose deployment accepts the discrete_resource_spec and starts the service on a suitable node.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100