Code Monkey home page Code Monkey logo

node-cli's Introduction

Node CLI

Build and publish Test Discord

SKALE Node CLI, part of the SKALE suite of validator tools, is the command line to setup, register and maintain your SKALE node.

Table of Contents

  1. Installation
  2. CLI usage
    2.1 Top level commands
    2.2 Node
    2.3 Wallet
    2.4 sChains
    2.5 Health
    2.6 SSL
    2.7 Logs
    2.8 Resources allocation
    2.9 Validate
  3. Exit codes
  4. Development

Installation

  • Prerequisites

Ensure that the following package is installed: docker, docker-compose (1.27.4+)

  • Download the executable
VERSION_NUM={put the version number here} && 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"

For versions <1.1.0:

VERSION_NUM=0.0.0 && sudo -E bash -c "curl -L https://skale-cli.sfo2.cdn.digitaloceanspaces.com/skale-$VERSION_NUM-`uname -s`-`uname -m` >  /usr/local/bin/skale"
  • Apply executable permissions to the downloaded binary:
chmod +x /usr/local/bin/skale
  • Test the installation
skale --help

CLI usage

Top level commands

Info

Print build info

skale info

Version

Print version number

skale version

Options:

  • --short - prints version only, without additional text.

Node commands

Prefix: skale node

Node information

Get base info about SKALE node

skale node info

Options:

-f/--format json/text - optional

Node initialization

Initialize a SKALE node on current machine

⚠️ Please avoid re-initialization: First run skale node info to confirm current state of intialization.

skale node init [ENV_FILE]

Arguments:

  • ENV_FILE - path to .env file (required parameters are listed in the skale init command)

You should specify the following environment variables:

  • SGX_SERVER_URL - SGX server URL
  • DISK_MOUNTPOINT - disk mount point for storing sChains data
  • DOCKER_LVMPY_STREAM - stream of docker-lvmpy to use
  • CONTAINER_CONFIGS_STREAM - stream of skale-node to use
  • IMA_ENDPOINT - IMA endpoint to connect
  • ENDPOINT - RPC endpoint of the node in the network where SKALE Manager is deployed
  • MANAGER_CONTRACTS_ABI_URL - URL to SKALE Manager contracts ABI and addresses
  • IMA_CONTRACTS_ABI_URL - URL to IMA contracts ABI and addresses
  • FILEBEAT_URL - URL to the Filebeat log server

Optional variables:

  • TG_API_KEY - Telegram API key
  • TG_CHAT_ID - Telegram chat ID
  • MONITORING_CONTAINERS - will enable monitoring containers (filebeat, cadvisor, prometheus)

Node initialization from backup

Restore SKALE node on another machine

skale node restore [BACKUP_PATH] [ENV_FILE]

Arguments:

  • BACKUP_PATH - path to the archive with backup data generated by skale node backup command
  • ENV_FILE - path to .env file (required parameters are listed in the skale init command)

Node backup

Generate backup file to restore SKALE node on another machine

skale node backup [BACKUP_FOLDER_PATH] [ENV_FILE]

Arguments:

  • BACKUP_FOLDER_PATH - path to the folder where the backup file will be saved

Node Registration

skale node register

Required arguments:

  • --ip - public IP for RPC connections and consensus
  • --domain/-d - SKALE node domain name
  • --name - SKALE node name

Optional arguments:

  • --port - public port - beginning of the port range for node SKALE Chains (default: 10000)

Node update

Update SKALE node on current machine

skale node update [ENV_FILEPATH]

Options:

  • --yes - remove without additional confirmation

Arguments:

  • ENV_FILEPATH - path to env file where parameters are defined

You can also specify a file with environment variables which will update parameters in env file used during skale node init.

Node turn-off

Turn-off SKALE node on current machine and optionally set it to the maintenance mode

skale node turn-off

Options:

  • --maintenance-on - set SKALE node into maintenance mode before turning off
  • --yes - remove without additional confirmation

Node turn-on

Turn on SKALE node on current machine and optionally disable maintenance mode

skale node turn-on [ENV_FILEPATH]

Options:

  • --maintenance-off - turn off maintenance mode after turning on the node
  • --yes - remove without additional confirmation

Arguments:

  • ENV_FILEPATH - path to env file where parameters are defined

You can also specify a file with environment variables which will update parameters in env file used during skale node init.

Node maintenance

Set SKALE node into maintenance mode

skale node maintenance-on

Options:

  • --yes - set without additional confirmation

Switch off maintenance mode

skale node maintenance-off

Domain name

Set SKALE node domain name

skale node set-domain

Options:

  • --domain/-d - SKALE node domain name
  • --yes - set without additional confirmation

Wallet commands

Prefix: skale wallet

Commands related to Ethereum wallet associated with SKALE node

Wallet information

skale wallet info

Options:

-f/--format json/text - optional

Wallet setting

Set local wallet for the SKALE node

skale wallet set --private-key $ETH_PRIVATE_KEY

Send ETH tokens

Send ETH tokens from SKALE node wallet to specific address

skale wallet send [ADDRESS] [AMOUNT]

Arguments:

  • ADDRESS - Ethereum receiver address
  • AMOUNT - Amount of ETH tokens to send

Optional arguments:

--yes - Send without additional confirmation

sChain commands

Prefix: skale schains

SKALE Chain list

List of SKALE Chains served by connected node

skale schains ls

SKALE Chain configuration

skale schains config SCHAIN_NAME

SKALE Chain DKG status

List DKG status for each SKALE Chain on the node

skale schains dkg

SKALE Chain info

Show information about SKALE Chain on node

skale schains info SCHAIN_NAME

Options:

  • --json - Show info in JSON format

SKALE Chain repair

Turn on repair mode for SKALE Chain

skale schains repair SCHAIN_NAME

Health commands

Prefix: skale health

SKALE containers

List all SKALE containers running on the connected node

skale health containers

Options:

  • -a/--all - list all containers (by default - only running)

sChains healthchecks

Show health check results for all SKALE Chains on the node

skale health schains

Options:

  • --json - Show data in JSON format

SGX

Status of the SGX server. Returns the SGX server URL and connection status.

$ skale health sgx

SGX server status:
┌────────────────┬────────────────────────────┐
│ SGX server URL │ https://0.0.0.0:1026/      │
├────────────────┼────────────────────────────┤
│ Status         │ CONNECTED                  │
└────────────────┴────────────────────────────┘

SSL commands

Prefix: skale ssl

SSL Status

Status of the SSL certificates on the node

skale ssl status

Admin API URL: [GET] /api/ssl/status

Upload certificates

Upload new SSL certificates

skale ssl upload
Options
  • -c/--cert-path - Path to the certificate file
  • -k/--key-path - Path to the key file
  • -f/--force - Overwrite existing certificates

Admin API URL: [GET] /api/ssl/upload

Check ssl certificate

Check ssl certificate be connecting to healthcheck ssl server

skale ssl check
Options
  • -c/--cert-path - Path to the certificate file (default: uploaded using skale ssl upload certificate)
  • -k/--key-path - Path to the key file (default: uploaded using skale ssl upload key)
  • --type/-t - Check type (openssl - openssl cli check, skaled - skaled-based check, all - both)
  • --port/-p - Port to start healthcheck server (defualt: 4536)
  • --no-client - Skip client connection (only make sure server started without errors)

Logs commands

Prefix: skale logs

CLI Logs

Fetch node CLI logs:

skale logs cli

Options:

  • --debug - show debug logs; more detailed output

Dump Logs

Dump all logs from the connected node:

skale logs dump [PATH]

Optional arguments:

  • --container, -c - Dump logs only from specified container

Resources allocation commands

Prefix: skale resources-allocation

Show allocation file

Show resources allocation file:

skale resources-allocation show

Generate/update

Generate/update allocation file:

skale resources-allocation generate [ENV_FILE]

Arguments:

  • ENV_FILE - path to .env file (required parameters are listed in the skale init command)

Options:

  • --yes - generate without additional confirmation
  • -f/--force - rewrite allocation file if it exists

Validate commands

Prefix: skale validate

Validate abi

Check whether ABI files contain valid JSON data

skale validate abi

Options:

  • --json - show validation result in json format

Exit codes

Exit codes conventions for SKALE CLI tools

  • 0 - Everything is OK
  • 1 - General error exit code
  • 3 - Bad API response**
  • 4 - Script execution error**
  • 5 - Transaction error*
  • 6 - Revert error*
  • 7 - Bad user error**
  • 8 - Node state error**

* - validator-cli only
** - node-cli only

Development

Setup repo

Install development dependencies

pip install -e .[dev]
Add flake8 git hook

In file .git/hooks/pre-commit add:

#!/bin/sh
flake8 .

Debugging

Run commands in dev mode:

ENV=dev python main.py YOUR_COMMAND

Setting up Travis

Required environment variables:

  • ACCESS_KEY_ID - DO Spaces/AWS S3 API Key ID
  • SECRET_ACCESS_KEY - DO Spaces/AWS S3 Secret access key
  • GITHUB_EMAIL - Email of GitHub user
  • GITHUB_OAUTH_TOKEN - GitHub auth token

Contributing

If you have any questions please ask our development community on Discord.

Discord

License

License

Copyright (C) 2018-present SKALE Labs

node-cli's People

Contributors

0x4a5e1e4baab avatar alexgex avatar badrogger avatar cstrangedk avatar dependabot-preview[bot] avatar dependabot[bot] avatar dmytronazarenko avatar dmytrotkk avatar gannakulikova avatar jonaspf avatar kladkogex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

node-cli's Issues

'skale node turn-on' command is failed for turned-off node

Preconditions
Active MEDIUM schain

Versions:
SKALE_NODE_CLI_VERSION=2.0.0-develop.24

Steps to reproduce:

  1. Run
skale node turn-off
  1. Wait until node was successfully turned-off
  2. Run
skale node turn-on --sync-schains .env

Actual state:
Error node-on during skale_nginx creation stage
The next variables are present in the .env file and not implemented to skaled configs:

  • DEFAULT_GAS_LIMIT
  • MAX_GAS_PRICE_WEI
  • DEFAULT_TIMEOUT
  • FILESTORAGE_MAPPING
  • SCHAINS_MNT_DIR

┆Issue is synchronized with this Jira Bug

Removed schains are marked as "exists" in node-cli

Versions

  • Node-cli 1.1.1-beta.1
  • CONTAINER_CONFIGS_STREAM=1.7.3-testnet

Steps to reproduce

  1. Create 2 schains
  2. Remove 2 schains
  3. Create new 2 schains
  4. Run cmd
sudo skale schains dkg

Expected state:
Cleaner should remove deleted sChains from "sChains dkg" list

┆Issue is synchronized with this Jira Bug

Run docker-lvmpy service using python 3.11

Currently docker-lvmpy is running using default python version for 18.04 node, which is 3.6 and it has been deprecated for a long time. We need to change installation procedure in a way that newer version of python (such as 3.11) is used.

Validator set new commission fee

Description: Multiple validators would like to change the commission fees because they have new customers and new commission fees set. Some validators have a lot of nodes, and these nodes are supporting skale chains, so no Exit is possible here to reregister with a new validator.

Main Solution: Ability to change commission fee.

Alternative : Be able to move nodes from one validator to another by link/unlink node.
It would be great at least if they could move a node from one validator to another to change the commission fee.

Make sure that all node-cli commands executed from one user

.skale folder now stored in the home directory which may lead to errors in cases when the node was inited from one user and then some commands were executed from another.

Possible solution: save user during skale node init and then check it in all commands.

┆Issue is synchronized with this Jira Task

Moving a node fails

install validator & node cli on a new machine.
copy ~/.skale/node_data/ from the old machine to the new one
run init on the new machine.

$ skale node info
This SKALE node is not registered on SKALE Manager yet

PS: sgx wallet is on a separate machine in the LAN. on the old machine, skale wallet info brought up 0x2a2f368c8e6d269d3f87bda4e9d1d10640f7e8b7. on the new one, it brings 0x08f8ed68b60da3d1db08645f920d5cf57c759233. I don't see how a node can use a previous registration if sgx-wallet returns a different address.

Set static disk sizes during resource allocation generation

Currently, resource allocation files generated dynamically which causes different allocation files on different machines.

This should be fixed:

  • Set default disk sizes for Testnet/QA/Mainnet
  • Check that real disk size is equal or bigger than the requirements for the current env.

┆Issue is synchronized with this Jira Task

Need to set SGX_SSL_KEY_PATH in ima container

after update node_cli version to 1.1.0-beta.10 SGX_SSL_KEY_PATH was not set after schain creation

version:
node_cli: 1.1.0-beta.10

from docker inspect <ima>:

        "Config": {
            "Hostname": "ip-172-31-12-17",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "SCHAIN_DIR=/skale_node_data/schains/buqubnvtFM",
                "MAINNET_PROXY_PATH=/skale_vol/contracts_info/ima.json",
                "SCHAIN_PROXY_PATH=/skale_node_data/schains/buqubnvtFM/proxy.json",
                "SCHAIN_NAME=buqubnvtFM",
                "SCHAIN_RPC_URL=http://127.0.0.1:10131",
                "MAINNET_RPC_URL=http://15.188.54.155:8545",
                "NODE_NUMBER=13",
                "NODES_COUNT=16",
                "SGX_URL=https://45.63.65.79:1026",
                "ECDSA_KEY_NAME=NEK:76ee90f77ea01bb501bea180e904cc66d301099383ec53ffcb5f53d7e1e710ce",
                "SGX_SSL_KEY_PATH",
                "SGX_SSL_CERT_PATH",
                "NODE_ADDRESS=0x33613b84eb80d644013be60d90f1e112573ca58c",
                "TM_URL_MAIN_NET=http://127.0.0.1:3008",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NODE_VERSION=10.15.1",
                "YARN_VERSION=1.13.0"
            ],

┆Issue is synchronized with this Jira Bug

Docker dont work after reboot

After instance restart we get "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?" error
Steps:

  1. reboot instance
  2. wait for instance start
  3. docker ps

┆Issue is synchronized with this Jira Bug

skale node restore bug with different mountpoint path

If a validator back up and restores in a new machine with a different mount_point path restore operation fails.

f'Disk size: {disk_size}, required disk size: {env_disk_size}'

Because DISK_MOUNTPOINT_FILEPATH reading from the back up file (which is SKALE_DIR, 'node_data' file), not from the newly defined by the validator [ENV_FILE]

skale node restore [BACKUP_PATH] [ENV_FILE]

┆Issue is synchronized with this Jira Task

Restructure sChain storage limits

Currently, internal sChain volume limits are calculated in 2 different ways for the different pieces. Consensus, LevelDB, and filestorage limits are calculated dynamically, but the storage limit is pre-set.

Everything should be generated in advance using static file in skale-node (configs.yml) and Python script in helper-scripts. It should generate schain_allocation.yml file with all params (in bytes)

┆Issue is synchronized with this Jira Task

Mysql error when trying to backup node

STR

  1. create backup node A on node_cli v.1
  2. restore on some node B from node A
  3. update node_cli from v.1 to v.2 for node B
  4. run backup node B

actual: have an issue with mysql
expected: backup.tar.gz success created

node_ip: 54.245.197.145

┆Issue is synchronized with this Jira Bug

Add node id to skale node info output

Node id is important for troubleshooting issues and right now it's impossible to get it without manually opening node_config.json file. We need to add this data into skale node info command output.

┆Issue is synchronized with this Jira Task

Add turn-on and turn-off commands to sync-node-cli

Currently, we have only 2 main commands in sync-node-cli:

  • sync-node init
  • sync-node update

It would be useful to have turn-on and turn-off commands that works in the same way as for the regular node-cli.

skale node register transaction fails

This issue might be better off filed in the skale-manager repo but I'm filing it here because I encountered it while using the skale cli tool.

background

I am setting up a 2nd node for my validator.

config:

SGX_SERVER_URL=https://<redacted>:1026/

# use your 200gb external storage mount point
# this was manually created and attached using azure web gui
DISK_MOUNTPOINT=/dev/sdc

# This will be used for later testing.
# It’s for interchain messaging agent feature for dApp developers.
# For now you don’t have to worry about this part. We will provide more information later on.
IMA_CONTRACTS_ABI_URL=https://skale-contracts.nyc3.digitaloceanspaces.com/beta/ima.json

# This manager contracts abi url is where the SKALE manager smart contract ABI lives.
# This can change based on the beta versions or develop versions...
# see: https://forum.skale.network/t/examples-environment-variables-hard-upgrade/197
MANAGER_CONTRACTS_ABI_URL=https://skale-contracts.nyc3.digitaloceanspaces.com/fuji-testnet/manager.json

# "This is for elastic search and for skale to monitor during testnet.
# It will be retired for the mainnet.
# It would be very cool if you can add this variable for now."
FILEBEAT_HOST=3.17.12.121:5000

CONTAINER_CONFIGS_STREAM=alpine-hard-upgrade
DOCKER_LVMPY_STREAM=beta
DB_PORT=3306
DB_ROOT_PASSWORD=test
DB_PASSWORD=test
DB_USER=test
IMA_ENDPOINT=rinkeby.infura.io/v3/<redacted>
ENDPOINT=https://rinkeby.infura.io/v3/<redacted>
NODE_CLI_SPACE=develop
SKALE_NODE_CLI_VERSION=0.10.0-develop.2

# see also: https://forum.skale.network/t/example-environment-variables/106


# Variables added during hard upgrade:

# True/False will enable monitoring containers (filebeat, cadvisor, prometheus)
# Required for TestNets
MONITORING_CONTAINERS=True

steps:

# initialize skale node
skale node init --install-deps ./env

# initialize skale validator
sk-val init \
  -e wss://rinkeby.infura.io/ws/v3/<redacted> \
  -c https://skale-contracts.nyc3.digitaloceanspaces.com/fuji-testnet/manager.json \
  --wallet software

# get your skale validator signature
export VALIDATOR_NAME=staked
export VALIDATOR_ID="$(sk-val validator ls | grep $VALIDATOR_NAME | awk '{ print $2 }')"
export SIGNATURE="$(skale node signature $VALIDATOR_ID | cut -d' ' -f2)"

# link your validator address to your node address
# (NOTE: assumes you have the validator private key saved to validator-pk.txt)

export NODE_ADDRESS="$(skale wallet info | grep Address | cut -d' ' -f2)"
sk-val validator link-address $NODE_ADDRESS $SIGNATURE --yes --pk-file ./validator-pk.txt
# ✔ Node address 0x9e6737c6C3B... linked to your validator address

export NODE_NAME='skale-node-vm'   # new node name
export IP_ADDRESS="$(curl ifconfig.co)"
export PORT_RANGE_START='10000'

skale node register --name $NODE_NAME --ip $IP_ADDRESS --port $PORT_RANGE_START

tx failure

The link-address transaction from my validator succeeds, but the register-node transaction from my node fails.

logs

Here are the logs from my skale_api container:

[2020-08-26 01:15:37 +0000] [8] [DEBUG] POST /create-node
[2020-08-26 01:16:08,096 INFO] core.node - MainThread -
====================================================================================================
Node create started
IP: 52.249.250.53
Public IP: 52.249.250.53
Port: 10000
Name: skale-node-secret-vm
====================================================================================================

[2020-08-26 01:16:08,336 INFO] skale.contracts.manager - MainThread - create_node: 52.249.250.53:10000, public ip: 52.249.250.53 name: skale-node-secret-vm
[2020-08-26 01:16:08,342 INFO] skale.transactions.tools - MainThread - Dry run tx: createNode, sender: 0x9e6737c6C3B69397c439d1D2084D8d1dDB8669C9, wallet: RPCWallet, gasLimit: 3500000
[2020-08-26 01:16:08,383 INFO] skale.transactions.tools - MainThread - Tx: createNode, sender: 0x9e6737c6C3B69397c439d1D2084D8d1dDB8669C9, wallet: RPCWallet, gasLimit: 3500000, gasPrice: 1250000000
[2020-08-26 01:16:51,156 INFO] skale.utils.web3_utils - MainThread - Current block number is 7083252, waiting for 5 confimration blocks to be mined
[2020-08-26 01:18:26,742 ERROR] core.node - MainThread - Node creation failed
Traceback (most recent call last):
  File "/usr/src/admin/core/node.py", line 91, in register
    confirmation_blocks=NODE_REGISTER_CONFIRMATION_BLOCKS
  File "/usr/local/lib/python3.7/dist-packages/skale/contracts/base_contract.py", line 84, in wrapper
    tx_res.raise_for_status()
  File "/usr/local/lib/python3.7/dist-packages/skale/transactions/result.py", line 98, in raise_for_status
    raise TransactionFailedError(f'Transaction failed. '
skale.transactions.result.TransactionFailedError: Transaction failed. See receipt AttributeDict({'blockHash': HexBytes('0x712fd83da4980afc80cc99fe4426db13f73c2b8540dc3e885edcf284ced62507'), 'blockNumber': 7083252, 'contractAddress': None, 'cumulativeGasUsed': 7291385, 'from': '0x9e6737c6C3B69397c439d1D2084D8d1dDB8669C9', 'gasUsed': 3359503, 'logs': [], 'logsBloom': HexBytes('0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'), 'status': 0, 'to': '0x139360fc743b1DA2adb43F5999E28998Da3b6285', 'transactionHash': HexBytes('0xf6d5a00065681a0b0f1bf5fe8068e881db2fd589d2ecfbcfc5014038a929bbbf'), 'transactionIndex': 1})

Ability to unregister validator nodes

Description: Nodes that do not have a stake and support the SKALE chain should be able to unregister.

Leading Solution: If a delegator undelegates, nodes supporting SKALE chains should have the ability to exit, and chains should be assigned to new validator nodes. Use node rotation to assign the SKALE chain to the new validator node.

Alternative solution:
Often, delegators want to change a different commission fee or a different validator. Just like we give the option to change the validator's public address to something else... Nodes can be reassigned to another validator.

Command 'skale exit status' shows incorrect result output

Command skale exit status shows incorrect result output if the node is in Maintenance mode

Preconditions
The node is in Maintenance mode

To Reproduce
Run commands:
skale exit start
skale exit status

Expected behavior
Output should be like "Node exiting is in process"

Actual result
Output is "Node exiting is completed"

Versions
node-cli: 2.1.0

IMPORTANT!!!
skale exit start shouldn't start AT ALL if the node is in Maintenance mode and the proper message should be shown

Node cli docker-compose check fails if there are any warnings

Describe the bug
If anything present stderr in docker-compose -v output compliance check will be failed. It can corrupt init and upgrade procedures for validators. We need to make sure we parsing only stdout output.

To Reproduce
Steps to reproduce the behavior:

Download node-cli on Ubuntu 18.04 machine with AWS
Run skale node init
Expected behavior
docker-compose check should return ok

Set wrong user in node_cli v.2.0

AWS nodes was running from ubuntu user

STR:

  1. update node_cli to 2.0.0-develop.19
  2. run 'sudo skale node update'

expect: user in file /etc/skale/config.json should be ubuntu
actual: user in file /etc/skale/config.json is root

┆Issue is synchronized with this Jira Bug

Add Telemetry support

Modern CLI collects anonymous data from users containing information like what kind of commands users are running on their machine and demographics. It does not have any private data. Telemetry is an essential feature for any CLI. You can work on what you can measure.

We can have the following functionalities:

Prune inodes on each skale update

Since docker may not clean unused inodes correctly, we need to execute
the following command at the end of each skale container update.

docker system prune -a

┆Issue is synchronized with this Jira Task

skale ssl upload returns exit code 0 on failure

When I run skale ssl upload and it fails due to permission problems I'd expect to get a non-zero exit code. This would make automation far easier because I wouldn't need to parse the output to determine if the command was successful.

$ skale ssl upload -c fullchain.pem -k privkey.pem
Command execution failed with [Errno 13] Permission denied: 'privkey.pem'. 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/ssl.py", line 71, in upload
  File "core/helper.py", line 188, in upload_certs
PermissionError: [Errno 13] Permission denied: 'privkey.pem'
2021-03-09 17:00:22,278 - [Errno 13] Permission denied: 'privkey.pem'

Followed by:

$ echo $?
0

Would be great if this could return something other than 0.

┆Issue is synchronized with this Jira Task

some of schain related functions are broken in node-cli

Version: 2.0.1-develop.25
Precond: few schains created by PK and multisig on network
Steps:
Call skale schains ls
Call skale schains show-rules name
Call skale health schains
Call skale node check
Expected: correct responses
Actual: see logs

┆Issue is synchronized with this Jira Bug

Skaled-volumes has been detached and not mount back after skale-node update

Versions

DOCKER_LVMPY_STREAM=1.0.1-develop.6
node-cli 2.0.1-develop.27

skaled RotationHistoryOlehTest6 - custom build

Steps to reproduce

  1. run skale node update with versions without checkouting branches
  2. check skaled containers - docker ps -a
  3. manually attach volume: mount /dev/mapper/schain_name /mnt/schain_name
  4. restart docker container

Actual state: Error response from daemon: Cannot restart container skale_schain_harsh-gorgonea-secunda: error while mounting volume '': VolumeDriver.Mount: {"Err": 2}
Expected state: Skaled volume should be attached automatedly without errors

Note: Manually restart skaled after the error from the actual state will repair skaled container

┆Issue is synchronized with this Jira Bug

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.