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

kubectl trace run fails on CoreOS #102

Closed
miguelbernadi opened this issue Feb 5, 2020 · 1 comment · Fixed by #103
Closed

kubectl trace run fails on CoreOS #102

miguelbernadi opened this issue Feb 5, 2020 · 1 comment · Fixed by #103

Comments

@miguelbernadi
Copy link

Our cluster nodes are running CoreOS and upon trying to test this tool we found the following error:

Error: failed to start container "kubectl-trace-2056455a-4836-11ea-a279-9078419759fa": Error response from daemon: error while creating mount source path '/usr/src': mkdir /usr/src: read-only file system

In CoreOS the main filesystem is read-only. Does the tool need to read/write there? Is it possible to configure it as user to avoid it? I couldn't find mentions in the docs or other issues on how to tackle this.

@alban
Copy link
Contributor

alban commented Feb 6, 2020

I can reproduce the issue on Flatcar Container Linux too. The issue seems to have been introduced by commit 6be420a (#76).

On CoreOS, there is no /usr/src but it is not needed: the headers are directly available under /lib/modules/$(uname -r)/. The tool does not need to read/write there.

To support both Ubuntu (with /usr/src) and CoreOS/Flatcar (without /usr/src), I would suggest to mount the host /usr under /usr-host in the tracerunner container and have a symlink from /usr-host/src to /usr/src.

I'll give it a try.

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

Successfully merging a pull request may close this issue.

2 participants