[go: up one dir, main page]

`octez-node upgrade storage` of non-mainnet data dir fails

We are restoring a v15 rolling tarball on a fresh v16 node. Before we start the node, we run:

octez-node upgrade storage --data-dir /var/tezos/node/data

But it fails:

│ Feb 17 19:43:33.056 - node.data_version: upgrading data directory from 2.0 to 3.0                                                                                                 │
│ Feb 17 19:43:33.056 - node.store: upgrading the store                                                                                                                             │
│ Feb 17 19:43:33.056 - node.store: store upgrade failed, cleaning up temporary files:                                                                                              │
│ Feb 17 19:43:33.056 - node.store:   Error:                                                                                                                                        │
│ Feb 17 19:43:33.056 - node.store:     Failed to load on-disk data: no corresponding data found in file /var/tezos/node/data/store/chain_NetXdQprcVkpa/protocol_levels.            │
│ Feb 17 19:43:33.056 - node.store:                                                                                                                                                 │
│ Feb 17 19:43:33.056 - node.data_version: failed to upgrade storage:                                                                                                               │
│ Feb 17 19:43:33.056 - node.data_version:   Error:                                                                                                                                 │
│ Feb 17 19:43:33.056 - node.data_version:     Failed to load on-disk data: no corresponding data found in file /var/tezos/node/data/store/chain_NetXdQprcVkpa/protocol_levels.     │
│ Feb 17 19:43:33.056 - node.data_version:                                                                                                                                          │
│ octez-node: Error:                                                                                                                                                                │
│               Failed to load on-disk data: no corresponding data found in file /var/tezos/node/data/store/chain_NetXdQprcVkpa/protocol_levels.

Note that the chain_id is wrong (NetXdQprcVkpa is mainnet). It should be looking for ghostnet since the config file in /var/tezos/node/data is set to ghostnet.

content of /var/tezos/node/data/config.json:

│ {                                                                                                                                                                                                                │
│   "metrics_addr": [                                                                                                                                                                                              │
│     "0.0.0.0:9932"                                                                                                                                                                                               │
│   ],                                                                                                                                                                                                             │
│   "shell": {                                                                                                                                                                                                     │
│     "history_mode": "rolling"                                                                                                                                                                                    │
│   },                                                                                                                                                                                                             │
│   "data-dir": "/var/tezos/node/data",                                                                                                                                                                            │
│   "rpc": {                                                                                                                                                                                                       │
│     "listen-addrs": [                                                                                                                                                                                            │
│       "10.244.0.16:8732",                                                                                                                                                                                        │
│       "127.0.0.1:8732"                                                                                                                                                                                           │
│     ],                                                                                                                                                                                                           │
│     "acl": [                                                                                                                                                                                                     │
│       {                                                                                                                                                                                                          │
│         "address": "10.244.0.16",                                                                                                                                                                                │
│         "blacklist": []                                                                                                                                                                                          │
│       }                                                                                                                                                                                                          │
│     ]                                                                                                                                                                                                            │
│   },                                                                                                                                                                                                             │
│   "p2p": {                                                                                                                                                                                                       │
│     "bootstrap-peers": [                                                                                                                                                                                         │
│       "ghostnet.teztnets.xyz",                                                                                                                                                                                   │
│       "ghostnet.smartpy.io",                                                                                                                                                                                     │
│       "ghostnet.boot.ecadinfra.com",                                                                                                                                                                             │
│       "ghostnet.kaml.fr",                                                                                                                                                                                        │
│       "ghostnet.stakenow.de:9733",                                                                                                                                                                               │
│       "ghostnet.visualtez.com"                                                                                                                                                                                   │
│     ],                                                                                                                                                                                                           │
│     "listen-addr": ":9732"                                                                                                                                                                                       │
│   },                                                                                                                                                                                                             │
│   "network": "ghostnet"                                                                                                                                                                                          │
│ }                                           

tezos-k8s values file to replicate the problem:

tezos_k8s_images:
  utils: ghcr.io/oxheadalpha/tezos-k8s-utils:6.15.0
node_config_network:
  chain_name: ghostnet
images:
  octez: tezos/tezos:v16.0-rc1

full_snapshot_url: null
rolling_snapshot_url: null
archive_tarball_url: https://ghostnet-v15.xtz-shots.io/archive-tarball
rolling_tarball_url: https://ghostnet-v15.xtz-shots.io/rolling-tarball