Logs pointer volume mounted as readonly
**Output of the info page **
There is no output because the datadog-agent container failed to start
Additional environment details (Operating System, Cloud provider, etc):
Operating System: Container OS Cloud Provider: Google Cloud Platform: Kubernetes 1.9.5
Steps to reproduce the issue:
- Add the following volume to a dd-agent daemonset configuration
volumes:
(...)
- hostPath:
path: /opt/datadog-agent/run
name: pointerdir
- Deploy
- Observe the pod failing to start, describe the pod
Describe the results you received:
I found that it failed to start because it could not create the /opt/datadog-agent folder:
Normal Created 7m (x3 over 8m) kubelet Created container
Warning Failed 7m (x3 over 8m) kubelet Error: failed to start container "dd-agent": Error response from daemon: error while creating mount source path '/opt/datadog-agent/run': mkdir /opt/datadog-agent: read-only file system
This is because Kubernetes now mounts volumes as readonly by default (A change introduced in K8s 1.9). Their stance on it is that this was a bug and no apps should have ever had write access to volumes, which is why I created this as a bug.
Describe the results you expected: I expected it to mount the volume successfuly.
facing this problem too
Talked with their support and if you put the mount under /var/run/[something] it will somehow work
👍 that fix is a little lame, can't they just add a PVC to the yaml to provision and mount a read/write volume.
Also seeing this
Still seeing this now. Fixed by changing /opt/datadog-agent/run to /var/run/datadog-agent 🤷♂