From 0e0ba404b9f959da7908cc27cac6ee9d08ead272 Mon Sep 17 00:00:00 2001 From: Nicolas Ochem Date: Thu, 23 Feb 2023 16:15:13 -0800 Subject: [PATCH] fix update storage logic to take into account config file (#554) 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 --- charts/tezos/scripts/upgrade-storage.sh | 2 +- test/charts/mainnet.expect.yaml | 2 +- test/charts/mainnet2.expect.yaml | 4 ++-- test/charts/private-chain.expect.yaml | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/tezos/scripts/upgrade-storage.sh b/charts/tezos/scripts/upgrade-storage.sh index 29b92f5d5..49fe429f7 100644 --- a/charts/tezos/scripts/upgrade-storage.sh +++ b/charts/tezos/scripts/upgrade-storage.sh @@ -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 diff --git a/test/charts/mainnet.expect.yaml b/test/charts/mainnet.expect.yaml index f156dcc74..350325fda 100644 --- a/test/charts/mainnet.expect.yaml +++ b/test/charts/mainnet.expect.yaml @@ -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: diff --git a/test/charts/mainnet2.expect.yaml b/test/charts/mainnet2.expect.yaml index 32ebf62f3..61402f4d4 100644 --- a/test/charts/mainnet2.expect.yaml +++ b/test/charts/mainnet2.expect.yaml @@ -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: @@ -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: diff --git a/test/charts/private-chain.expect.yaml b/test/charts/private-chain.expect.yaml index 49f383e67..ecdf62b53 100644 --- a/test/charts/private-chain.expect.yaml +++ b/test/charts/private-chain.expect.yaml @@ -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: @@ -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: @@ -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: