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

zef install fails when building a Dockerfile in Travis #214

Closed
JJ opened this issue Dec 2, 2017 · 19 comments
Closed

zef install fails when building a Dockerfile in Travis #214

JJ opened this issue Dec 2, 2017 · 19 comments

Comments

@JJ
Copy link
Contributor

JJ commented Dec 2, 2017

Check out this https://travis-ci.org/JJ/alpine-perl6/builds/310471878
It also fails, same error, in Docker hub

Context

Building locally this Dockerfile https://github.com/JJ/alpine-perl6/ works without a problem. However, it fails in Travis and Docker Hub.

Expected Behavior

I would expect it to work exactly the same way, since Dockerfile descriptions are unambiguous. It might have to do with the Docker cache, but I would expect it to fail locally, not in the cloud.

Actual Behavior

Error as above https://travis-ci.org/JJ/alpine-perl6/builds/310471878
And here too: https://hub.docker.com/r/jjmerelo/alpine-perl6/builds/bpuk3prltfj87pxv2ksyrp3/

Steps to Reproduce

Fork and download the repo, configure it for a Travis build, and push it

Your Environment

I'm using rakudobrew build moar, and rakudobrew build zef after that in an Alpine container as above.

@ugexe
Copy link
Owner

ugexe commented Dec 2, 2017

The t/ tests don't make any network requests, and in fact all the real testing happens in xt/ (which isn't run by rakudobrew/zef). So the test failure is probably in https://github.com/ugexe/zef/blob/master/t/utils-filesystem.t which make me think it is either something like $HOME or $TMPDIR not being set in the environment (although if I understand correctly this shouldn't be the case with this Dockerfile? maybe the cloud provider sets/changes one of these?)

@JJ
Copy link
Contributor Author

JJ commented Dec 2, 2017 via email

@JJ
Copy link
Contributor Author

JJ commented Dec 2, 2017

The only difference I have found is the one mentioned here: https://forums.docker.com/t/what-is-dirperm1-supported/2550/2 Locally, dirperm1 is false (and kernel 3.13) and Travis uses dirperm1 true (and kernel 4.4). However, it should have been the other way round, something not working locally and working in Travis, right?

@ugexe
Copy link
Owner

ugexe commented Dec 2, 2017

To get the precise test failure, run the following after installing rakudo:
git clone https://github.com/ugexe/zef.git && prove -v -e 'perl6 -I zef/lib' zef/t

It's also probably a good idea to add the -v flag to rakudobrew's invocation of zef test.

@JJ
Copy link
Contributor Author

JJ commented Dec 2, 2017

OK, I'll do that. Meanwhile, my hunch is that it's related to an AUFS bug related to permissions https://github.com/sfjro/aufs3-linux/tree/aufs3.18/Documentation/filesystems/aufs
That is obviously not your fault, but I wonder if I could find a workaround in that case...

@JJ
Copy link
Contributor Author

JJ commented Dec 2, 2017

There does not seem to be a problem with the test phase, but with the installation phase itself. I'm running it with verbose to see what's going on https://travis-ci.org/JJ/alpine-perl6/builds/310572021

@ugexe
Copy link
Owner

ugexe commented Dec 2, 2017

You need to call zef/bin/zef install ... (and -I zef/lib) as the last command unless you first cd zef

@JJ
Copy link
Contributor Author

JJ commented Dec 2, 2017

Yep, I've added that now. Thanks anyway.

@ugexe
Copy link
Owner

ugexe commented Dec 2, 2017

perl6 -I zef/lib zef/bin/zef --verbose install zef/

@JJ
Copy link
Contributor Author

JJ commented Dec 2, 2017

It's working now https://travis-ci.org/JJ/alpine-perl6
I don't know what did the trick, but it worked :-) Thanks!

@JJ JJ closed this as completed Dec 2, 2017
@ugexe
Copy link
Owner

ugexe commented Dec 2, 2017

I suspect installing prove fixed it. To emulate the previous state locally you would do perl6 -Ilib bin/zef --/prove install . which disables prove and falls back to running the test files 1 by 1 via perl6 -I $some-lib $test-file. These 2 variants shouldn't result in differences in exitcode, but when it does (because it has before) its usually something in Test.pm

@JJ
Copy link
Contributor Author

JJ commented Dec 2, 2017

But would that differences in exit code account for the error in installation?

@ugexe
Copy link
Owner

ugexe commented Dec 2, 2017

If you are referring to rakudobrew then it does zef test . before installing, and never reached the zef install . command. The tests failed, but we never saw the output with zef -v ... before prove was installed (I suspect the output would say everything is OK, but the exitcode was non-zero for an unknown reason).

@JJ
Copy link
Contributor Author

JJ commented Dec 2, 2017

Not sure about that... Since the other thing that has changed is the path, could that be it? We're running it now from the top directory.

@JJ
Copy link
Contributor Author

JJ commented Dec 2, 2017

And the other thing is the openssl-dev package. If zef depends on that, it might fail for that reason... Bringing me back to my #215 issue: more information is needed on failure. We really don't know why it failed before...

@ugexe
Copy link
Owner

ugexe commented Dec 2, 2017

Perhaps... maybe that + precomp end up with it trying to write somewhere it shouldn't. You might try to cd zef after cloning it and trying it from inside to emulate how rakudobrew does it.

@ugexe
Copy link
Owner

ugexe commented Dec 2, 2017

zef doesn't depend on openssl-dev

@JJ
Copy link
Contributor Author

JJ commented Dec 2, 2017

It's building up nicely now... https://travis-ci.org/JJ/alpine-perl6/builds/310587658

@JJ
Copy link
Contributor Author

JJ commented Dec 2, 2017

@ugexe beats me, then... It must be the .precomp thing, combined with the difference in storage driver locally and in Travis or Docker hub. Thanks for all your help, much appreciated!

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

2 participants