skalenetwork / skale-admin

SKALE admin docker container orchestrates all other SKALE Docker containers
https://skale.network
GNU Affero General Public License v3.0
18 stars 4 forks source link

skale admin tries recognize SGX IP on archival node after node rotation #1082

Closed oleksandrSydorenkoJ closed 2 months ago

oleksandrSydorenkoJ commented 3 months ago

Versions: admin:2.7.0-beta.0 skaled: 3.19.0-beta.1-historic

Preconditions: Active schain medium type Whitelisted IP for sync node Consensus databases aren't pruned At least 400 000 blocks on Skale chain

Steps to reproduce

  1. Spin-up historic node from the 0 block - node should start catching up
  2. Without waiting for the catchup process to complete, start node rotation on the Skale chain.
  3. Wait until the skaled on the archival node syncs to the rotation block and exits

Expected state: Skale admin should restart skaled without recognizing of SGX IP for the historic node

Actual state: Skale admin tries to get the SGX IP every monitoring round on thee archival node

[2024-06-19 14:08:12,501 ERROR][7][numb-heavy-sadalachbia][T_1] - core.schains.task:26 - Task numb-heavy-sadalachbia-skaled failed with Missing fields {'own_ip': [SGX_IP]}
Traceback (most recent call last):
  File "/usr/src/admin/core/schains/task.py", line 24, in run
    self.action()
  File "/usr/src/admin/core/schains/monitor/main.py", line 162, in run_skaled_pipeline
    status = skaled_checks.get_all(log=False, expose=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/admin/core/schains/checks.py", line 126, in get_all
    if hasattr(self, name):
       ^^^^^^^^^^^^^^^^^^^
  File "/usr/src/admin/core/schains/checks.py", line 324, in firewall_rules
    logger.debug(f'Rule controller {self.rc.expected_rules()}')
                                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/admin/core/schains/firewall/rule_controller.py", line 180, in expected_rules
    self.internal_rules,
    ^^^^^^^^^^^^^^^^^^^
  File "/usr/src/admin/core/schains/firewall/rule_controller.py", line 54, in wrapper
    raise NotInitializedError(f'Missing fields {missing}')
core.schains.firewall.rule_controller.NotInitializedError: Missing fields {'own_ip': [SGX_IP]}
[2024-06-19 14:08:12,516 INFO][7][numb-heavy-sadalachbia][T_1] - core.schains.task:27 - Sleeping after task execution for 2
[2024-06-19 14:08:18,595 INFO][7][numb-heavy-sadalachbia][T_0] - core.schains.checks:224 - Upstream config status, rotation_id 2: exist: True, ips: True, stream: True, triggered: False