-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add support for bind mounts under /tmp
with hermetic tmp
#20583
Conversation
|
6f24a98
to
551606e
Compare
/tmp
with conflicting mount pairs/tmp
sandbox mount pairs
@lberki Both tests pass with |
Disabling hermetic
(2) and (3) contain some amount of DWIM, which could come back to bite us: for example, I could imagine someone creative mounting I think the only theoretically perfect solution is either (1) or to apply some cleverness to rewrite or reorder the mount specifications such that they do they right thing. But I don't like cleverness so my preferred option is (1). |
I also favor 1, but what about the other code paths that disable the feature, e.g. a tmpfs mount under |
Why do we have to continue supporting |
There are cases where you would want your test to be able to communicate with some external process (such as Docker) via a socket in |
Fair enough. Mind taking a stab at implementing the clever reordering / rewriting I mentioned in one of the above comments then? It doesn't look impossible or fundamentally difficult, it was just cleverness I had hoped we could live without. |
Sure, I will give it a try. |
Thanks, let me know when you need my eyes (I'm OOO from Friday until the end of this year, though) |
551606e
to
816ebca
Compare
/tmp
sandbox mount pairs/tmp
with hermetic tmp
816ebca
to
91d0d37
Compare
@lberki I implemented the rewriting and my test cases pass now. Are there any more scenarios you would like me to add tests for? |
@bazel-io fork 7.0.1 |
This is achieved by rewriting the user-specified mounts to mounts onto subdirectories of the hermetic sandbox tmp directory.
91d0d37
to
9aa90a0
Compare
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.
Looks very reasonable. I have one nit, but I could even be convinced that that one is not important.
src/main/java/com/google/devtools/build/lib/sandbox/LinuxSandboxedSpawnRunner.java
Outdated
Show resolved
Hide resolved
ee5a5dd
to
64c8693
Compare
For the Open JDK 11 / Mac OS tests ( for the rest, I don't know -- maybe @meteorcloudy or @fweikert or @Wyverald do? |
The test failures are due to our CI machine upgrades and will be gone when we rebase this PR on top of master. (No need to do that; we're already doing the import internally.) |
This is achieved by rewriting the user-specified mounts to mounts onto subdirectories of the hermetic sandbox tmp directory. Fixes bazelbuild#20527 Closes bazelbuild#20583. PiperOrigin-RevId: 595815029 Change-Id: Ibfe5f67fb8fb59131b6c82a826ed5200f2b10a94
…20749) This is achieved by rewriting the user-specified mounts to mounts onto subdirectories of the hermetic sandbox tmp directory. Fixes #20527 Closes #20583. Commit 5e68afd PiperOrigin-RevId: 595815029 Change-Id: Ibfe5f67fb8fb59131b6c82a826ed5200f2b10a94 Co-authored-by: Fabian Meumertzheim <[email protected]>
@bazel-io fork 7.1.0 |
This is achieved by rewriting the user-specified mounts to mounts onto subdirectories of the hermetic sandbox tmp directory. Fixes bazelbuild#20527 Closes bazelbuild#20583. PiperOrigin-RevId: 595815029 Change-Id: Ibfe5f67fb8fb59131b6c82a826ed5200f2b10a94
This is achieved by rewriting the user-specified mounts to mounts onto subdirectories of the hermetic sandbox tmp directory. Fixes bazelbuild#20527 Closes bazelbuild#20583. PiperOrigin-RevId: 595815029 Change-Id: Ibfe5f67fb8fb59131b6c82a826ed5200f2b10a94
…20772) This is achieved by rewriting the user-specified mounts to mounts onto subdirectories of the hermetic sandbox tmp directory. Fixes #20527 Closes #20583. Commit 5e68afd PiperOrigin-RevId: 595815029 Change-Id: Ibfe5f67fb8fb59131b6c82a826ed5200f2b10a94 Co-authored-by: Fabian Meumertzheim <[email protected]> Co-authored-by: lberki <[email protected]>
This is achieved by rewriting the user-specified mounts to mounts onto subdirectories of the hermetic sandbox tmp directory.
Fixes #20527