-
Notifications
You must be signed in to change notification settings - Fork 6
Document state of linux-sandbox in the container
#33
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
Document state of linux-sandbox in the container
#33
Conversation
linux-sandbox does not work by default and is by some expected to work.
linux-sandbox in the container
README.md
Outdated
| ### Bazel's `linux-sandbox` | ||
|
|
||
| `linux-sandbox` makes use of [Linux user namespaces](https://man7.org/linux/man-pages/man7/user_namespaces.7.html). | ||
| These only work for `linux-sandbox` as expected, if the following snipped is added to the `.devcontainer/devcontainer.json`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "snipped" should be "snippet"
|
Docker capability SYS_ADM should be sufficient that the container can create and write to namespaces it created, and I suspect the test attempting to access /tmp/shm is the reason the container requires --privileged. This doesn't really change the fact that LoLa tests would likely require --privileged in any case. |
I already tried You can check if it might work work with |
Yes, sorry I mixed two topics. What I meant was, I think you will have this problem with that test even outside of Bazel or any sandboxing issues. Trying to run a test which is accessing /tmp/shm in a Docker container at all will require --privileged. As far as I know, there is no docker cap to cover the use case. I think it's good to document --privileged as a requirement for LoLa testing. |
What I also noticed is that POSIX message queue IDs might not be namespaced and I had tests with colliding IDs even though |
|
https://docs.podman.io/en/latest/markdown/podman-run.1.html#privileged podman should confine containers better than docker when using |
linux-sandboxdoes not work by default and is by some expected to work. For example tests of https://github.com/eclipse-score/communication actually only are stable if run withlinux-sandbox. Otherwise they tip on each others toes.Fixes #32