Support volume mount propagation options
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
The ECS Agent should have first class support for the Docker volume mount propagation options, "[r]shared", "[r]slave", and "[r]private". These options are documented sparsely [here](https://docs.docker.com/engine/reference/run/#volume-shared-filesystems), and more comprehensively [here](https://www.mankier.com/1/docker-run#--volume).
This should be a straightforward extension to the `mountPoints` property in the task definition. For example:
```
"mountPoints": [
{
"sourceVolume": "string",
"containerPath": "string",
"readOnly": true|false
"propagation": "[[r]shared]|[[r]slave]|[[r]private]"
}
]
```
Please note that it is currently possible to specify these options by appending them to the `containerPath` string. For example, the following task definition creates a '/data' mount in the container with propagation set to "shared".
```
{
"family": "myapp",
"volumes": [ {
"name": "data",
"host": {
"sourcePath": "/data"
}
} ],
"containerDefinitions": [ {
"name": "myapp",
"image": "myco/myapp",
"mountPoints": [ {
"sourceVolume": "data",
"containerPath": "/data:shared"
} ]
} ]
}
```
This works because the ECS Agent passes the containerPath string through to the Docker remote API unchanged. However, it's an undocumented hack that relies on an internal implementation detail of the agent. We are currently relying on this hack to get our application to work and would appreciate that it be allowed to continue to work at least until this issue is resolved.
Contributor guide
Research direction
The issue names ECS Agent task definitions, mountPoints, containerPath, and Docker remote API behavior; begin by tracing how mountPoints are parsed and forwarded. Done means the three propagation options are supported as a mountPoints property, with the existing containerPath form considered for compatibility.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100