Skip to content

fix containers cleanup bug#972

Merged
dmytrotkk merged 2 commits intodevelopfrom
fix-containers-cleanup
Apr 15, 2026
Merged

fix containers cleanup bug#972
dmytrotkk merged 2 commits intodevelopfrom
fix-containers-cleanup

Conversation

@dmytrotkk
Copy link
Copy Markdown
Collaborator

This pull request introduces a new utility function, rm_legacy_containers, to help clean up legacy Docker containers with names starting with skale_. The function is integrated into several node operation workflows to ensure legacy containers are consistently removed during update and shutdown processes. Comprehensive tests for this new functionality have also been added.

Docker container cleanup improvements:

  • Added a new function rm_legacy_containers in docker_utils.py to remove all containers with names starting with skale_ using Docker's filtering capabilities.
  • Integrated calls to rm_legacy_containers into the update and shutdown flows for both base and fair node operations (base.py and fair.py), ensuring legacy containers are removed during these processes. [1] [2] [3] [4] [5]

Testing enhancements:

  • Added rm_legacy_containers to the import lists in both the main code and test files. [1] [2] [3]
  • Implemented a new test, test_rm_legacy_containers, to verify that containers with names starting with skale_ are properly removed.
  • Added a real Docker test, test_get_all_skaled_containers_real, to ensure container name filtering works as expected.

badrogger
badrogger previously approved these changes Apr 15, 2026
@dmytrotkk dmytrotkk merged commit 99fbbfa into develop Apr 15, 2026
2 checks passed
@dmytrotkk dmytrotkk deleted the fix-containers-cleanup branch April 15, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skale-cli doesn't remove the skaled and sync-admin containers during update to 5.0 release

2 participants