Skip to content
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

Logs pointer volume mounted as readonly #3734

Open
alphashuro opened this issue May 10, 2018 · 5 comments
Open

Logs pointer volume mounted as readonly #3734

alphashuro opened this issue May 10, 2018 · 5 comments

Comments

@alphashuro
Copy link

**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:

  1. Add the following volume to a dd-agent daemonset configuration
volumes:
  (...)
  - hostPath:
     path: /opt/datadog-agent/run
  name: pointerdir
  1. Deploy
  2. 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.

@yansenarmandau
Copy link

yansenarmandau commented Jun 11, 2018

facing this problem too

@ghost
Copy link

ghost commented Jun 12, 2018

Talked with their support and if you put the mount under /var/run/[something] it will somehow work

@JohnDzialo
Copy link

JohnDzialo commented Jul 6, 2018

👍
that fix is a little lame, can't they just add a PVC to the yaml to provision and mount a read/write volume.

@Tyler-Churchill
Copy link

Also seeing this

@lyzs90
Copy link

lyzs90 commented Mar 25, 2020

Still seeing this now. Fixed by changing /opt/datadog-agent/run to /var/run/datadog-agent 🤷‍♂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants