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
gvisor: init at 2019-11-14 #73097
gvisor: init at 2019-11-14 #73097
Conversation
39b32fd
to
fc15db2
Compare
Do you have sandboxing enabled in your local nix? The build fails, because it tries to download some repository dependencies. Most of the nix world has sandboxing enabled, which restricts network access to fixed-output derivations. |
fc15db2
to
6448357
Compare
@Profpatsch - I do, yes. I think the problem is that the |
e79b2a1
to
593b61d
Compare
@Profpatsch - Okay, between #74013 and this PR, it's building successfully and reproducibly 🎉 |
Can you add a simple nixos vm test starting a container, so we can verify it works? |
593b61d
to
726559a
Compare
@flokli - Okay, added a test that exercises both the |
726559a
to
34344de
Compare
@Profpatsch / @flokli - Okay, rebased now that #74103 is merged. This should be ready to merge now, and tests pass locally. |
34344de
to
ba2e010
Compare
a852a36
to
eddf8c2
Compare
# available in the $PATH; patch these now. | ||
patches = [ ./gvisor-do-paths.patch ]; | ||
postPatch = '' | ||
substituteInPlace runsc/cmd/do.go \ |
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.
For the sake of maintainability:
Could we just do a wrapProgram $out/bin/runsc --prefix PATH : ${stdenv.lib.makeBinPath [ iproute iptables procps ]}
in installPhase
, instead of patching the source code?
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.
@flokli - Done! And confirmed that it works in the NixOS test as well.
eddf8c2
to
903eba6
Compare
903eba6
to
c37902d
Compare
I also just bumped to an actual tagged release of |
Thanks! |
gvisor: init at 2019-11-14 (cherry picked from commit 3140fa8)
Motivation for this change
This is a revamp of #50218 after enough upstream changes that it's possible to build inside a Nix sandbox. This was requested in #39889, but there were some problems with Bazel at the time. I've managed to get this working with
buildBazelPackage
. At the end of the whole process, gvisor is runnable:(I also added the
containerd
shim as well, since it didn't feel worth another PR)Things done
sandbox
innix.conf
on non-NixOS linux)macOSTested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)Tested compilation of all pkgs that depend on this change usingnix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc original reviewers @nlewo, @Profpatsch, and commenters @dtzWill, @benpye and @ghuntley
Closes #50218
Closes #39889