openethereum/parity-deploy

Error upgrading parity data: CannotCreateConfigPath

drandreaskrueger opened this issue · 24 comments

git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy
./parity-deploy.sh --config dev --name instantseal --geth
docker-compose up

results in

Pulling host1 (parity/parity:stable)...
stable: Pulling from parity/parity
3b37166ec614: Pull complete
504facff238f: Pull complete
ebbcacd28e10: Pull complete
c7fb3351ecad: Pull complete
2e3debadcbf7: Pull complete
7f6af3eb31f4: Pull complete
f3f7881c4019: Pull complete
50d35ce58406: Pull complete
9a3b96a0f918: Pull complete
1fe9fb6fb58c: Pull complete
c83743d94dd0: Pull complete
969cd73ce977: Pull complete
c74e70272632: Pull complete
Digest: sha256:20eccf6b6d28fa0e5f14b6b5dd3b63625e17e8114e098b40dceec2bf5ee154e4
Status: Downloaded newer image for parity/parity:stable
Creating host1 ... done
Attaching to host1
host1    | Loading config file from /parity/authority.toml
host1    | Error upgrading parity data: CannotCreateConfigPath
host1 exited with code 1

this solves it for me

git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy
./parity-deploy.sh --config dev --name instantseal --geth

sed -i 's/parity:stable/parity:v1.11.11/g' docker-compose.yml
docker-compose up

@drandreaskrueger can you please re-try with the latest master. See: #77

@drandreaskrueger yes older versions of the docker image ran as root rather than the parity user. The PR merged fixes some permission issues due to this change.

can you please re-try ...

yes - but perhaps not before November.
I am traveling, web3summit & devcon. Greetings from Berlin.

Actually, are you in Berlin? Then we should meet in person!

sudo rm -rf data && ./parity-deploy.sh --config aura --nodes 2 && docker-compose up ?? :-)

Yes I will be at the web3 summit, it would be great to speak to you in person.

sudo rm -rf data ....

Thanks. I think I had done sudo ./clean.sh and that does rm -rf data ... strange.

Will try again, but probably only after devcon?

would be great to speak to you in person.

yesyesyes.
Already met Afri yesterday. Perhaps he can point me out to you.
Or look at my twitter avatar, to recognize me. Specifically changed it for this purpose tonight ;-)

Can I close this one?

I'm still seeing this issue running ./parity-deploy.sh --config dev

David, we also saw this last Thursday. You had a very quick fix for it though.

Is there some sort of a quick-fix for this?

@ilhanu sure, basically do a chown -R on the data dir to the user you're running docker as.

In parity-deploy if you create a new data dir (e.g. after a clean.sh) it will now mkdir the data dirs before starting the container the first time. This works around the permissions issue inside the container.

Closing issue.

sudo chown $USER:$USER -R data

?

Couldn't you simply make this part of ./clean.sh somehow ?

Happy New Year :-)

Reappeared. See here #87 (comment)

Please try to invent a solution which does not need machine specific user interaction, otherwise it is hard to include parity-deploy.sh in other tools.

Thanks.

In parity-deploy if you create a new data dir (e.g. after a clean.sh) it will now mkdir the data dirs before starting the container the first time. This works around the permissions issue inside the container.

Just tried that, but ... nope:

PARITY_VERSION=v2.2.3

sudo rm -rf paritytech_parity-deploy
git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy/
git checkout 11b64e11cc9403101aa1e0db0bfbc72997e01a74

sudo ./clean.sh
mkdir data

./parity-deploy.sh -r $PARITY_VERSION --config dev --geth

sed -i 's/parity:stable/parity:'$PARITY_VERSION'/g' docker-compose.yml
docker-compose up

ends with

Starting host1 ... done
Attaching to host1
host1    | Loading config file from /home/parity/authority.toml
host1    | Error upgrading parity data: CannotCreateConfigPath
host1 exited with code 1

only when I do this, it works:

docker-compose up
sudo chmod -R 777 data
docker-compose up

but that means accepting that it fails once, and I do not know if it causes other problems later.

Can you please the branch in here: #94

Can you please the branch in here: #94

you merged that to master now, right?

Tried it out, just now:

PARITY_VERSION=v2.2.3
sudo rm -rf paritytech_parity-deploy
git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy
git log | head -n 5 
git checkout 1a6afd17ac75bdf6c9e9fefa1d3af13748dd9cfa
sudo ./clean.sh
./parity-deploy.sh -r $PARITY_VERSION --config dev --geth
sed -i 's/parity:stable/parity:'$PARITY_VERSION'/g' docker-compose.yml
docker-compose up

yes it works. Well done.

So I do not need to manually create

mkdir data

anymore?

and the following includes patches for v1.11.11:

PARITY_VERSION=v1.11.11
sudo rm -rf paritytech_parity-deploy
git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy
git log | head -n 5 
git checkout 1a6afd17ac75bdf6c9e9fefa1d3af13748dd9cfa

sudo ./clean.sh
sudo rm $(which parity)
./parity-deploy.sh -r $PARITY_VERSION --config dev --geth

sed -i 's/user:\ parity/user:\ root/g' docker-compose.yml 
sed -i 's/parity:stable/parity:'$PARITY_VERSION'/g' docker-compose.yml
docker-compose up

and ... it also works.

Cool, thanks a lot. Well done.

Now @ddorgan this issue can be closed lol.

instantseal

Why not store the above, and these blocks here for future testing purposes, when you improve this great tool:

aura

PARITY_VERSION=v2.2.3
sudo rm -rf paritytech_parity-deploy
git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy
git checkout 1a6afd17ac75bdf6c9e9fefa1d3af13748dd9cfa
sudo ./clean.sh
./parity-deploy.sh -r $PARITY_VERSION --config aura --nodes 4 --geth
sed -i 's/parity:stable/parity:'$PARITY_VERSION'/g' docker-compose.yml
docker-compose up
PARITY_VERSION=v1.11.11
sudo rm -rf paritytech_parity-deploy
git clone https://github.com/paritytech/parity-deploy.git paritytech_parity-deploy
cd paritytech_parity-deploy
git checkout 1a6afd17ac75bdf6c9e9fefa1d3af13748dd9cfa
sudo ./clean.sh
sudo rm $(which parity)
./parity-deploy.sh -r $PARITY_VERSION --config aura --nodes 4 --geth
sed -i 's/user:\ parity/user:\ root/g' docker-compose.yml 
sed -i 's/parity:stable/parity:'$PARITY_VERSION'/g' docker-compose.yml
docker-compose up