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

Dry run fails after privilege changes in Geth Docker #102

Closed
zilm13 opened this issue Apr 12, 2018 · 2 comments
Closed

Dry run fails after privilege changes in Geth Docker #102

zilm13 opened this issue Apr 12, 2018 · 2 comments

Comments

@zilm13
Copy link
Contributor

zilm13 commented Apr 12, 2018

Hello,
We are using your recommendations for running Hive on CI:

    # Pull in and hive, restore cached ethash DAGs and do a dry run
    - go get -u github.com/karalabe/hive
    - (cd ~/.go_workspace/src/github.com/karalabe/hive && mkdir -p workspace/ethash/ ~/.ethash)
    - (cd ~/.go_workspace/src/github.com/karalabe/hive && cp -r ~/.ethash/. workspace/ethash/)
    - (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=NONE --test=. --sim=. --loglevel=6)

After recent changes in Geth Dockerfile (probably this: ethereum/go-ethereum#16052 ) dry run fails on Circle CI:

INFO[04-12|14:23:55] creating ethash container 
INFO[04-12|14:23:55] building new docker image                nocache=false
Step 1 : FROM ethereum/client-go
Pulling from ethereum/client-go
[.....SKIP.....]
Pull complete
Digest: sha256:d51a959a32954c70cd54b7b5143b878c33699a86980e74e35a9ca6c07a89ab71
Status: Downloaded newer image for ethereum/client-go:latest
 ---> eded061e6b12
Step 2 : RUN echo '#!/bin/sh'                          > /ethash.sh && 	echo 'set -e'                            >> /ethash.sh && 	echo 'geth makedag 1 /root/.ethash'      >> /ethash.sh &&   echo 'if [ "$UID" != "0" ]; then'        >> /ethash.sh && 	echo '  adduser -u $UID -D ethash'       >> /ethash.sh && 	echo '  chown -R ethash /root/.ethash/*' >> /ethash.sh &&   echo 'fi'                                >> /ethash.sh && 	chmod +x /ethash.sh
 ---> Running in e11a5abe9cec
/bin/sh: can't create /ethash.sh: Permission denied
EROR[04-12|14:24:03] failed to build docker image             error="The command '/bin/sh -c echo '#!/bin/sh'                          > /ethash.sh && \techo 'set -e'                            >> /ethash.sh && \techo 'geth makedag 1 /root/.ethash'      >> /ethash.sh &&   echo 'if [ \"$UID\" != \"0\" ]; then'        >> /ethash.sh && \techo '  adduser -u $UID -D ethash'       >> /ethash.sh && \techo '  chown -R ethash /root/.ethash/*' >> /ethash.sh &&   echo 'fi'                                >> /ethash.sh && \tchmod +x /ethash.sh' returned a non-zero code: 1"

Looks like https://github.com/karalabe/hive/blob/master/internal/ethash/Dockerfile should be updated for new permissions?

@karalabe
Copy link
Member

We've reverted these permission changes, they broke too many things. Sorry about the messup.

@zilm13
Copy link
Contributor Author

zilm13 commented May 11, 2018

@karalabe
Now it fails here on .10 Go version:
https://github.com/ethereum/go-ethereum/blob/c8695fae359aa327da9203a57ffaf4f2d47d4370/build/ci.go#L160
I see you have changed string comparison of version in latest go-ethereum builds but this Dockerfile points to old build:
https://github.com/karalabe/hive/blob/master/simulators/ethereum/rpc/eth/Dockerfile#L14

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