Skip to content

Tooling: fix dependencies in tezos docker manager script

Purpose

When I set up a testnode on my machine, I had the same problems as this issue: #1827 (closed)

Description

The upgrader container doesn't need to run every time, this container is with a race condition with the node container.

The importer container needs a clean directory.

Solution

Only add upgrader in the docker-compose file when it is called. (./hangzhounet.sh node upgrade)

Clean data directory when importer is called, and confirm if the user has sure.

Testing

Download this script:

$ wget -O hangzhounet.sh https://gitlab.com/tezos/tezos/-/raw/d1387d10ef4728f2d9d3987bcc01f8bc566dd6f6/scripts/tezos-docker-manager.sh
$ chmod +x hangzhounet.sh

Download a snapshot, Start and Import must works with successful:

$ wget https://snapshot-api.tezos.marigold.dev/testnet -O tezos-hangzhounet.rolling
$ ./hangzhounet.sh start --rpc-port 8732 --allow-all-rpc :8732
$ ./hangzhounet.sh snapshot import "$PWD/tezos-hangzhounet.rolling"

Must show some message like:

importer_1  | Jan 24 19:00:46.759 - node.snapshots: successful import from file /snapshot

Upgrade the node must work too:

./hangzhounet.sh node upgrade

Check and logs:

$ docker logs hangzhounet_node_1 --follow 
# Or just check if hangzhounet_node_1 isn't restarting with:
$ docker ps
Edited by Felipe Cardozo

Merge request reports