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
syscall: TestCloneNEWUSERAndRemapNoRootDisableSetgroups fails on CentOS 7 #26385
Comments
CC @LK4D4 |
Output for command: |
The test passes now, after I changed some kernel settings:
But it was completely uninformed! |
On some other Issue, someone asked to run 'unshare' command.
|
I just realized there was previous Issues about this ... sorry for duplication: https://go-review.googlesource.com/c/go/+/49311 I don't have this directory:
Should function checkUserNS(...) skip if file not found ? |
I don't think we should unconditionally skip the test if the file does not exist, as my system doesn't have that file either. It sounds like some CentOS 7 systems have that file and some do not, but I don't know what that would be. |
It looks like now CentOS 7 has unprivileged namespaces disabled by default with kernel parameter. |
Is there some way we can detect CentOS and just skip the test? Perhaps look in |
In general the tests have to pass for users who don't understand what the code does. So while that would be easier for us, it would just be mystifying for most people installing Go. If the test can't reliably pass, we have to just skip it. |
@ianlancetaylor Yeah, apparently all centos releases have |
It's me :)
Can I have a try on the fix ? If you feel more confortable I can give a try testing on rhel7.5, before making any decision. |
@EduRam Sure, send a fix, if you can do it very soon for the 1.11 release. Thanks. |
Change https://golang.org/cl/124555 mentions this issue: |
I think I have found the root cause of the problem. I had no problems executing the syscall package tests after running the command:
By default that variable is 0, and the tests failed.
My submitted fix will not check the existence of file "/etc/centos-release" as suggested. Could this also be ok ? |
On CentOS 7, had an error on test TestCloneNEWUSERAndRemapNoRootDisableSetgroups test.
On Fedora28, all tests are sucessfull.
There is a previous Issue on the same matter #11261.
But in my case the message is different: "invalid argument, output:"
What version of Go are you using (
go version
)?go version go1.10.3 linux/amd64
Does this issue reproduce with the latest release?
yes. i tried tip
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
No errors on test phase.
What did you see instead?
The text was updated successfully, but these errors were encountered: