-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agent does not start with read-only file system #15127
Comments
Funny Im just now checking this off on my InfoSec checklist... Perfect timing? |
+1 waiting for Datadog agent to work with read-only FS. |
Hi @kayman-mk, @tomwire and @vyrtus15 Thanks for reporting this issue. In order to prioritise this feature request, please contact Datadog support and link this issue. Thanks for your comprehension. 🙇 |
Support contacted: https://help.datadoghq.com/hc/en-us/requests/1101939 |
Hi @kayman-mk, |
@clamoriniere Any news here? The support answered on Feb 20 with:
|
Our workaround was to docker diff the running container and get a list of all the paths that are written in the container. Then in the task definition that uses the datadog image, we added a docker volume which was configured to use those paths that came back in the docker diff. This doesnt necessarily need to be a docker volume, any would work. We only need to link /etc/datadog-agent and /opt/datadog-agent to that docker volume before locking down the root volume. I suspect people may have different paths that need to be available, but that's what worked for us. Our agent is currently running and reporting correctly with the root volume locked. |
Good solution, @tomwire, but I am a little afraid that I run into problems if I update the version of the agent and it needs a different file set than the one before. |
@kayman-mk 100% agree, this is definitely the concern we have. I suspect the solution might end up being the configuration I recommended and a promise from DD that the filesystem will not be changed without proper notice. And some extra caution that our stacks are nothing alike, results may vary. FWIW, our pipelines for our agents always grab the latest DD image, build and deploys, on a routine schedule. We haven't had any issues since and there have been updates. I suppose a script that monitors syslog messages for permission errors on writing to files outside of the mounted volumes would save some headaches, but Im going to cross that bridge when DD breaks. I have a feeling the agents are well engineered and wont be throwing many surprises. |
+1 waiting for Datadog agent to work with read-only FS. |
+1 |
1 similar comment
+1 |
+1 Other vendors are supporting this already, so waiting for the official solution by DataDog. Formal support case also entered. |
+1 |
7 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
Given this article https://docs.datadoghq.com/security/default_rules/cis-docker-1.2.0-5.12/ would be good to see progress on this. |
I just got my agent deployed in AKS with read-only root filesystem. I am using the helm chart v3.52.0 |
I also successfully have the agent running with a read-only root filesystem. This is on ECS Fargate. When the agent boots it tries to write configuration to |
+1 Can we please prioritise this? We'd like this to be solved in the Datadog agent rather than applying the workaround mentioned above. Thank you! |
+1 |
This
If |
Hi, I had the same issue and came across here. Although It seems to be working, I am concerned that the image's Edit: With this workaround, datadog-agent/Dockerfiles/agent/cont-init.d/51-docker.sh Lines 16 to 19 in 2f792ba
and this case is managed in 59-defaults.sh, which makes |
+1 |
1 similar comment
+1 |
Our security team asked me to make the root file system of all containers read only. But I figured out that the Datadog agent dies and is not able to run on a read only file system.
Log output
Agent Environment
I am pulling the agent from
public.ecr.aws/datadog/agent:latest
. I do not see a version number in the log. I included it as a side car to my AWS ECS task definition.Describe what happened:
After setting
"readonlyRootFilesystem": true,
in the task definition, the Datadog agent isn't able to start.Describe what you expected:
Datadog agent should run as normal.
Steps to reproduce the issue:
Run the agent as a sidecar in AWS ECS. Set
"readonlyRootFilesystem": true,
in your container task definition.Additional environment details (Operating System, Cloud provider, etc):
AWS ECS
The text was updated successfully, but these errors were encountered: