Add support for memswap_limit
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.7k
- Forks
- 676
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 6
Description
Currently Swap related options of standalone docker aren't available in Swarm Mode.
Docker compose supports top level(under service) element of memswap_limit, but using it with stack deploy causes error:
memswap_limit: Set resource limits using deploy.resources
and resources section doesnt's support either top level elements memswap_limit nor memswap.
I've tried it in deploy.resources.limits as well, but no success:
services.my_srv.deploy.resources.limits Additional property memswap is not allowed
Related to this closed(but not fixed) issue https://github.com/docker/compose/issues/7594#issuecomment-2521853318
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
The issue does not name source files or tests. Start by tracing how stack deploy validates deploy.resources and how Swarm Mode represents resource limits, then compare that path with the standalone Compose memswap_limit option. Done means a stack can specify the requested swap limit without validation errors and the setting is applied by Swarm.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100