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

User namespaces again: Nix tests fail on Oracle Linux 7 #2165

Closed
unsatcore opened this issue May 17, 2018 · 2 comments
Closed

User namespaces again: Nix tests fail on Oracle Linux 7 #2165

unsatcore opened this issue May 17, 2018 · 2 comments

Comments

@unsatcore
Copy link
Contributor

Hi,

this one is similar to #1625 and is related to #1797.

When upgrading Nix on OL7 several tests fail because of unavailable user namespaces.
The kernel is compiled with CONFIG_USER_NS=y but the feature is disabled at grub level.
canUseSandbox fails to detect that because of

if [ -e /proc/sys/kernel/unprivileged_userns_clone ]; then

My understanding this is a Debian-specific way(?).
The file simply doesn't exist on RHEL-derivatives leading to incorrect result of the check.

The simplest workaround would be to simply invert the condition, perhaps?

I'm not aware if there is a more portable way to check for user namespaces availability.
Well, except of brute-force - compile and run a simple C program using unshare/clone - which is not very elegant.

@coretemp
Copy link

@algebriac 👍 on the brute-force method.

@veprbl
Copy link
Member

veprbl commented May 27, 2018

There is an userspace utility unshare(1): https://linux.die.net/man/1/unshare

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