skalenetwork / skalenetwork/node-cli
Fair node cleanup doesn't work for unregistered node
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 21
- Forks
- 7
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 5
Description
TASK [cleanup_nodes : Build and execute cleanup command] ************************************************************************************************************************************************************************************************************************************************************
fatal: [pivot-1]: FAILED! => {"changed": true, "cmd": ["fair", "node", "cleanup", "--yes"], "delta": "0:00:43.119596", "end": "2025-08-21 16:07:55.111606", "msg": "non-zero return code", "rc": 1, "start": "2025-08-21 16:07:11.992010", "stderr": "2025-08-21 16:07:13,850 - INFO - Turning off the node...\n2025-08-21 16:07:13,850 - INFO - Removing compose containers\n2025-08-21 16:07:54,738 - INFO - Compose containers removed\n2025-08-21 16:07:54,738 - INFO - Removing sChains containers\n2025-08-21 16:07:54,768 - INFO - Removing IMA containers\n2025-08-21 16:07:54,798 - INFO - Removing telegraf (if exists)\n2025-08-21 16:07:54,829 - INFO - Node was successfully turned off\nTraceback (most recent call last):\n File \"node_cli/main.py\", line 133, in <module>\n File \"click/core.py\", line 1157, in __call__\n File \"click/core.py\", line 1078, in main\n File \"click/core.py\", line 1688, in invoke\n File \"click/core.py\", line 1688, in invoke\n File \"click/core.py\", line 1434, in invoke\n File \"click/core.py\", line 783, in invoke\n File \"node_cli/utils/helper.py\", line 294, in wrapper\n File \"node_cli/cli/fair_node.py\", line 167, in cleanup_node\n File \"node_cli/utils/decorators.py\", line 63, in inner\n File \"node_cli/fair/common.py\", line 87, in cleanup\n File \"node_cli/operations/fair.py\", line 285, in cleanup\n File \"node_cli/core/schains.py\", line 293, in cleanup_no_lvm_datadir\nnode_cli.core.schains.NoDataDirForChainError: No data directory found in /var/lib/skale/schains. Please check the path or specify a chain name.", "stderr_lines": ["2025-08-21 16:07:13,850 - INFO - Turning off the node...", "2025-08-21 16:07:13,850 - INFO - Removing compose containers", "2025-08-21 16:07:54,738 - INFO - Compose containers removed", "2025-08-21 16:07:54,738 - INFO - Removing sChains containers", "2025-08-21 16:07:54,768 - INFO - Removing IMA containers", "2025-08-21 16:07:54,798 - INFO - Removing telegraf (if exists)", "2025-08-21 16:07:54,829 - INFO - Node was successfully turned off", "Traceback (most recent call last):", " File \"node_cli/main.py\", line 133, in <module>", " File \"click/core.py\", line 1157, in __call__", " File \"click/core.py\", line 1078, in main", " File \"click/core.py\", line 1688, in invoke", " File \"click/core.py\", line 1688, in invoke", " File \"click/core.py\", line 1434, in invoke", " File \"click/core.py\", line 783, in invoke", " File \"node_cli/utils/helper.py\", line 294, in wrapper", " File \"node_cli/cli/fair_node.py\", line 167, in cleanup_node", " File \"node_cli/utils/decorators.py\", line 63, in inner", " File \"node_cli/fair/common.py\", line 87, in cleanup", " File \"node_cli/operations/fair.py\", line 285, in cleanup", " File \"node_cli/core/schains.py\", line 293, in cleanup_no_lvm_datadir", "node_cli.core.schains.NoDataDirForChainError: No data directory found in /var/lib/skale/schains. Please check the path or specify a chain name."], "stdout": "Command failed with following errors:\n--------------------------------------------------\nNo data directory found in /var/lib/skale/schains. Please check the path or specify a chain name.\n--------------------------------------------------\nYou can find more info in /root/.skale/.skale-cli-log/debug-node-cli.log", "stdout_lines": ["Command failed with following errors:", "--------------------------------------------------", "No data directory found in /var/lib/skale/schains. Please check the path or specify a chain name.", "--------------------------------------------------", "You can find more info in /root/.skale/.skale-cli-log/debug-node-cli.log"]}
fatal: [pivot-0]: FAILED! => {"changed": true, "cmd": ["fair", "node", "cleanup", "--yes"], "delta": "0:00:42.948543", "end": "2025-08-21 16:07:55.351468", "msg": "non-zero return code", "rc": 1, "start": "2025-08-21 16:07:12.402925", "stderr": "2025-08-21 16:07:14,121 - INFO - Turning off the node...\n2025-08-21 16:07:14,121 - INFO - Removing compose containers\n2025-08-21 16:07:54,978 - INFO - Compose containers removed\n2025-08-21 16:07:54,979 - INFO - Removing sChains containers\n2025-08-21 16:07:55,011 - INFO - Removing IMA containers\n2025-08-21 16:07:55,041 - INFO - Removing telegraf (if exists)\n2025-08-21 16:07:55,070 - INFO - Node was successfully turned off\nTraceback (most recent call last):\n File \"node_cli/main.py\", line 133, in <module>\n File \"click/core.py\", line 1157, in __call__\n File \"click/core.py\", line 1078, in main\n File \"click/core.py\", line 1688, in invoke\n File \"click/core.py\", line 1688, in invoke\n File \"click/core.py\", line 1434, in invoke\n File \"click/core.py\", line 783, in invoke\n File \"node_cli/utils/helper.py\", line 294, in wrapper\n File \"node_cli/cli/fair_node.py\", line 167, in cleanup_node\n File \"node_cli/utils/decorators.py\", line 63, in inner\n File \"node_cli/fair/common.py\", line 87, in cleanup\n File \"node_cli/operations/fair.py\", line 285, in cleanup\n File \"node_cli/core/schains.py\", line 293, in cleanup_no_lvm_datadir\nnode_cli.core.schains.NoDataDirForChainError: No data directory found in /var/lib/skale/schains. Please check the path or specify a chain name.", "stderr_lines": ["2025-08-21 16:07:14,121 - INFO - Turning off the node...", "2025-08-21 16:07:14,121 - INFO - Removing compose containers", "2025-08-21 16:07:54,978 - INFO - Compose containers removed", "2025-08-21 16:07:54,979 - INFO - Removing sChains containers", "2025-08-21 16:07:55,011 - INFO - Removing IMA containers", "2025-08-21 16:07:55,041 - INFO - Removing telegraf (if exists)", "2025-08-21 16:07:55,070 - INFO - Node was successfully turned off", "Traceback (most recent call last):", " File \"node_cli/main.py\", line 133, in <module>", " File \"click/core.py\", line 1157, in __call__", " File \"click/core.py\", line 1078, in main", " File \"click/core.py\", line 1688, in invoke", " File \"click/core.py\", line 1688, in invoke", " File \"click/core.py\", line 1434, in invoke", " File \"click/core.py\", line 783, in invoke", " File \"node_cli/utils/helper.py\", line 294, in wrapper", " File \"node_cli/cli/fair_node.py\", line 167, in cleanup_node", " File \"node_cli/utils/decorators.py\", line 63, in inner", " File \"node_cli/fair/common.py\", line 87, in cleanup", " File \"node_cli/operations/fair.py\", line 285, in cleanup", " File \"node_cli/core/schains.py\", line 293, in cleanup_no_lvm_datadir", "node_cli.core.schains.NoDataDirForChainError: No data directory found in /var/lib/skale/schains. Please check the path or specify a chain name."], "stdout": "Command failed with following errors:\n--------------------------------------------------\nNo data directory found in /var/lib/skale/schains. Please check the path or specify a chain name.\n--------------------------------------------------\nYou can find more info in /root/.skale/.skale-cli-log/debug-node-cli.log", "stdout_lines": ["Command failed with following errors:", "--------------------------------------------------", "No data directory found in /var/lib/skale/schains. Please check the path or specify a chain name.", "--------------------------------------------------", "You can find more info in /root/.skale/.skale-cli-log/debug-node-cli.log"]}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at node_cli/cli/fair_node.py:167 and follow cleanup through node_cli/fair/common.py, node_cli/operations/fair.py, and node_cli/core/schains.py:293. Reproduce fair node cleanup --yes on an unregistered node and trace the NoDataDirForChainError; done means cleanup completes successfully for that case without the reported failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100