Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cleaner. Add more logs #1121

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion core/schains/cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,14 @@ def monitor(skale, node_config, dutils=None):

for schain_name in schains_on_node:
if schain_name not in schain_names_on_contracts:
logger.warning(
logger.info(
'%s was found on node, but not on contracts: %s, trying to cleanup',
schain_name,
schain_names_on_contracts,
)
if schain_name == '':
logger.warning('Found phantom schain on node')
continue
try:
ensure_schain_removed(skale, schain_name, node_config.id, dutils=dutils)
except Exception:
Expand All @@ -138,6 +141,12 @@ def get_schains_on_node(dutils=None):
schains_with_dirs = os.listdir(SCHAINS_DIR_PATH)
schains_with_container = get_schains_with_containers(dutils)
schains_active_records = get_schains_names()
logger.info(
'dirs %s, containers: %s, records: %s',
schains_with_dirs,
schains_with_container,
schains_active_records
)
return sorted(merged_unique(schains_with_dirs, schains_with_container, schains_active_records))


Expand Down
Loading