skalenetwork/skale-node

Upgrading the node cli from v1.0.0 to v1.1.0-beta.5 leads to schain_allocation.yml error

Chainode opened this issue · 11 comments

After registering the validator and the node successfully with v1.0.0 version, the upgrading procedure was started.

The env variables were updated, the .skale/node_data/skale.db was removed before skale node update and node cli was updated to v1.1.0-beta.5.

The result of running sudo skale node update config.env is:

sudo skale node update config.env
Are you sure you want to update SKALE node software? [y/N]: y
Updating the node...
Command execution failed with [Errno 2] No such file or directory: '/home/harmm11/.skale/config/schain_allocation.yml'. Recheck your inputs
Traceback (most recent call last):
  File "main.py", line 111, in <module>
  File "site-packages/click/core.py", line 829, in **call**
  File "site-packages/click/core.py", line 782, in main
  File "site-packages/click/core.py", line 1259, in invoke
  File "site-packages/click/core.py", line 1259, in invoke
  File "site-packages/click/core.py", line 1066, in invoke
  File "site-packages/click/core.py", line 610, in invoke
  File "cli/node.py", line 156, in update_node
  File "core/node.py", line 184, in update
  File "core/host.py", line 73, in prepare_host
  File "core/resources.py", line 133, in update_resource_allocation
  File "core/resources.py", line 77, in compose_resource_allocation_config
  File "core/helper.py", line 81, in safe_load_yml
FileNotFoundError: [Errno 2] No such file or directory: '/home/harmm11/.skale/config/schain_allocation.yml'



┆Issue is synchronized with this [Jira Task](https://skalelabs.atlassian.net/browse/SKALE-3770)

➤ Evgeniy Zherdzitskiy commented:

Probably he need to do this:
skale resources-allocation generate
And then try again

@EvgeniyZZ This is an upgrade from mainnet version to testnet latest version. He was able to checkout manually from .skale/config folder but he should be able to upgrade without manual work with skale node update

Hey @Chainode!
Thank you for reporting this.

This issue is caused by the incompatibility between versions of node-cli and skale-node.
schain_allocation.yml file mentioned in the issue was added in 1.2.0 Testnet release of SKALE Node (see release notes). So to use node-cli v1.1.0-beta.5 you should update skale-node tag (CONTAINER_CONFIGS_STREAM variable in your .env file) to 1.2.0-testnet or newer.

Sorry for this inconvenience, in the current implementation we don't have compatibility errors handling in our components which may cause such problems, but we're going to resolve this issue in the upcoming versions.

Hey @Dmitry-Tk!

Sure, no problem.

I see but I used 1.3.2-testnet for CONTAINER_CONFIGS_STREAM variable in the .env file. This was specified in the documentation for the upgrade and is also newer than 1.2.0-testnet. This means that the error appeared although the requirement is fulfilled.

➤ Automation for Jira commented:

Corresponding Pull Request skalenetwork/node-cli#401

➤ Automation for Jira commented:

Corresponding Pull Request skalenetwork/node-cli#404

➤ Automation for Jira commented:

Corresponding Pull Request skalenetwork/node-cli#405

@Chainode Hi! Please be advised that the fix is ready and will be coming as a part of the next TestNet update :)

➤ Evgeniy Zherdzitskiy commented:

Alex Danko

➤ Evgeniy Zherdzitskiy commented:

Can be postpone for current time.
Will include in regression testing scope

➤ Alex Danko commented:

works for
node_cli:1.1.0-beta.13

ubuntu@ip-172-31-4-63:~$ sudo skale info

Version: 1.0.0
Full version: 1.0.0
Build time: 2020-09-16 17:25:05
Build OS: Linux-x86_64
Commit: b8cc5c52162a6afb4008de384e8eac255341c34f
Git branch: stable

ubuntu@ip-172-31-4-63:$ VERSION_NUM=1.1.0-beta.13 && sudo -E bash -c "curl -L https://github.com/skalenetwork/node-cli/releases/download/$VERSION_NUM/skale-$VERSION_NUM-`uname -s-uname -m` > /usr/local/bin/skale"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 640 100 640 0 0 3497 0 --:--:-- --:--:-- --:--:-- 3497
100 19.2M 100 19.2M 0 0 13.4M 0 0:00:01 0:00:01 --:--:-- 19.4M
ubuntu@ip-172-31-4-63:
$ sudo skale info

Version: 1.1.0
Full version: 1.1.0-beta.13
Build time: 2021-02-02 16:37:01
Build OS: Linux-x86_64
Commit: d4afd61c0bba8e11b7c1c51f7e61cb7b3f9b903b
Git branch: beta