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

beyla is trying to write the root filesystem #593

Open
esara opened this issue Feb 1, 2024 · 2 comments
Open

beyla is trying to write the root filesystem #593

esara opened this issue Feb 1, 2024 · 2 comments

Comments

@esara
Copy link
Contributor

esara commented Feb 1, 2024

following k8s security best practices - for example https://cloud.google.com/architecture/best-practices-for-building-containers#file_system_security - if you run beyla with

  securityContext:
    privileged: true
    readOnlyRootFilesystem: true

you get

$ kubectl logs -f beyla-75jgp
time=2024-02-01T02:13:57.589Z level=INFO msg="Grafana Beyla" Version=0da32eb2 "OpenTelemetry SDK Version"=1.18.0
time=2024-02-01T02:13:57.798Z level=ERROR msg="cant start process tracer. Stopping it" component=discover.TraceAttacher error="can't mount BPF filesystem: creating directory /var/run/beyla/beyla-13430: mkdir /var/run/beyla: read-only file system"
time=2024-02-01T02:13:57.798Z level=ERROR msg="Beyla couldn't find target process" error="couldn't start Process Finder: can't instantiate discovery.ProcessFinder pipeline: instantiating terminal instance \"TraceAttacher\": can't mount BPF filesystem: creating directory /var/run/beyla/beyla-13430: mkdir /var/run/beyla: read-only file system"

As a potential solution, we can mount an emptydir in the example - happy to create a pr for the docs

@esara esara changed the title beyla is trying to write the root filesystem - which is against container best practices beyla is trying to write the root filesystem Feb 1, 2024
@mariomac
Copy link
Contributor

mariomac commented Feb 1, 2024

Thank you very much! We will explain this in our documentation.

@grcevski
Copy link
Contributor

grcevski commented Feb 1, 2024

I think we can improve this as you mentioned. We need a location to store the pinned eBPF maps, but we make our own file system that's eBPF based, so technically it doesn't have to be in /var/run/...

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

3 participants