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

Tests fail without CONFIG_USER_NS=y #1521

Closed
dezgeg opened this issue Aug 17, 2017 · 5 comments
Closed

Tests fail without CONFIG_USER_NS=y #1521

dezgeg opened this issue Aug 17, 2017 · 5 comments

Comments

@dezgeg
Copy link
Contributor

dezgeg commented Aug 17, 2017

The testsuite fails on Arch Linux, presumablu due to lack of user namespaces:

error: cloning builder process: Invalid argument
error: unable to start build process
+ outPath=
FAIL: tests/linux-sandbox.sh

and

error: cloning builder process: Invalid argument
error: build of ‘/tmp/nix-build-nix-1.12pre5511_c94f3d55.drv-0/nix-test/store/qq9v4bnc71y93qpwy18vcm1k2kqylc1w-build-hook-input-1.drv’ on ‘local?root=/tmp/nix-build-nix-1.12pre5511_c94f3d55.drv-0/nix-test/store1’ failed: unable to start build process
cannot build derivation ‘/tmp/nix-build-nix-1.12pre5511_c94f3d55.drv-0/nix-test/store/8mdh71d0mw0y4awqmzmxkf595di4kfza-build-hook.drv’: 1 dependencies couldn't be built
error: build of ‘/tmp/nix-build-nix-1.12pre5511_c94f3d55.drv-0/nix-test/store/8mdh71d0mw0y4awqmzmxkf595di4kfza-build-hook.drv’ failed
+ outPath=
FAIL: tests/build-remote.sh

Presumably those tests could try calling some trivial unshare command and skip those tests if they don't work (except unshare comes from util-linux, not coreutils, sigh...).

@jcumming
Copy link

jcumming commented Jan 8, 2018

Also fails on SLES11-SP4.

@edolstra
Copy link
Member

edolstra commented Jan 8, 2018

Does /proc/self/ns/user exist if CONFIG_USER_NS is disabled? If not, its existence can be used to decide whether to run the test.

@dezgeg
Copy link
Contributor Author

dezgeg commented Jan 8, 2018

It doesn't but unfortunately that most likely doesn't fix the Debian problem: #1625 (comment)

@dezgeg
Copy link
Contributor Author

dezgeg commented Jan 8, 2018

But I guess you could check the existence and/or value of /proc/sys/kernel/unprivileged_userns_clone...

dezgeg added a commit to dezgeg/nix that referenced this issue Jan 13, 2018
Disable various tests if the kernel doesn't support unprivileged user
namespaces (e.g. Arch Linux disables them) or disable them via a sysctl
(Debian, Ubuntu).

Fixes NixOS#1521
Fixes NixOS#1625
@dezgeg
Copy link
Contributor Author

dezgeg commented Jan 13, 2018

#1797 should fix this using that method.

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