Skip to content

Commit

Permalink
fix update storage logic to take into account config file (#554)
Browse files Browse the repository at this point in the history
With v15 to v16 upgrades, we started seeing failures updating storage of
non-mainnet networks.

We reported upstream:

https://gitlab.com/tezos/tezos/-/issues/4892#note_1287844009

However it turns out that the data dir we were passing did not have a
config file, so it was unable to figure out which network the data dir
was for.

This is fixed by passing config file instead of data dir.

I tried by launching v15 ghostnet from a snapshot, then upgrading to
v16. I also tried launching a v16 tarball directly from scratch. Both
worked.

test
  • Loading branch information
nicolasochem authored Feb 24, 2023
1 parent 8e247fc commit 0e0ba40
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/tezos/scripts/upgrade-storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ then
printf "No context in data dir found, probably initial start, doing nothing."
exit 0
fi
octez-node upgrade storage --data-dir /var/tezos/node/data
octez-node upgrade storage --config /etc/tezos/config.json
2 changes: 1 addition & 1 deletion test/charts/mainnet.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ spec:
printf "No context in data dir found, probably initial start, doing nothing."
exit 0
fi
octez-node upgrade storage --data-dir /var/tezos/node/data
octez-node upgrade storage --config /etc/tezos/config.json
envFrom:
env:
Expand Down
4 changes: 2 additions & 2 deletions test/charts/mainnet2.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ spec:
printf "No context in data dir found, probably initial start, doing nothing."
exit 0
fi
octez-node upgrade storage --data-dir /var/tezos/node/data
octez-node upgrade storage --config /etc/tezos/config.json
envFrom:
env:
Expand Down Expand Up @@ -870,7 +870,7 @@ spec:
printf "No context in data dir found, probably initial start, doing nothing."
exit 0
fi
octez-node upgrade storage --data-dir /var/tezos/node/data
octez-node upgrade storage --config /etc/tezos/config.json
envFrom:
env:
Expand Down
6 changes: 3 additions & 3 deletions test/charts/private-chain.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ spec:
printf "No context in data dir found, probably initial start, doing nothing."
exit 0
fi
octez-node upgrade storage --data-dir /var/tezos/node/data
octez-node upgrade storage --config /etc/tezos/config.json
envFrom:
env:
Expand Down Expand Up @@ -1014,7 +1014,7 @@ spec:
printf "No context in data dir found, probably initial start, doing nothing."
exit 0
fi
octez-node upgrade storage --data-dir /var/tezos/node/data
octez-node upgrade storage --config /etc/tezos/config.json
envFrom:
env:
Expand Down Expand Up @@ -1218,7 +1218,7 @@ spec:
printf "No context in data dir found, probably initial start, doing nothing."
exit 0
fi
octez-node upgrade storage --data-dir /var/tezos/node/data
octez-node upgrade storage --config /etc/tezos/config.json
envFrom:
env:
Expand Down

0 comments on commit 0e0ba40

Please sign in to comment.