[ECS] [request] Support cgroupns Docker flag
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
### Summary
We would like to be able to leverage the [Docker "--cgroupns" flag](https://docs.docker.com/engine/reference/commandline/container_create/#options) when creating a task.
### Why
We would like to run our integration (nri-ecs) on ECS EC2 having cgroupsV2, however, due to the change of the value of `default-cgroupns-mode` for cgourpsV2 (with https://github.com/moby/moby/pull/40174) we have some issues since we cannot access some files we leverage to gather and compute several metrics.
I think it is already possible to modify the `default-cgroupns-mode` therefore I do not expect that to be a security issue, just a missing flag. Consider that it was an issue other projects had https://github.com/compose-spec/compose-spec/issues/148.
### Expected Behavior
- I'd like to have the possibility to configure from the task `--cgroupns` to override the default?
- Is there a workaround to set such option per task?
Contributor guide
Research direction
Start with the Docker `--cgroupns` flag documentation and the ECS task-creation configuration described in the issue. Check how `default-cgroupns-mode` behaves with cgroupsV2 and determine whether a per-task setting can override it. Done means ECS tasks can configure the cgroup namespace mode, or the supported workaround is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, linux
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100