v3.1 upgrade failsafe
The storage upgrade procedure (introduced in !13160 (merged)) was broken if the data directory was not containing any previous data. For example
$./octez-node config init --data-directory ./parisnet --network https://teztnets.com/paris2net
Jun 06 09:21:59.887: the node configuration has been successfully validated.
Created /home/vicall/.tezos-node/config.json for network.
$./octez-node run --data-dir ./parisnet --rpc-addr 127.0.0.1
Jun 06 09:22:42.136: upgrading data directory from 3.0 to 3.1
Jun 06 09:22:42.137: failed to upgrade storage
octez-node: Error:
Sys_error("./parisnet/store/chain_NetXR64bNAYkP/status6b8927.tmp: No such file or directory")
This simple MR simply add a check to avoid such failure.
Manually testing the MR
Run the above command with/without the patch
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Julien Tesson