Skip to content

Conversation

@nesitor
Copy link
Member

@nesitor nesitor commented Nov 26, 2025

Solve duplicated firewall rules when a VM is removed and re-allocated or when restart the service.

Related ClickUp, GitHub or Jira tickets : ALEPH-446

Self proofreading checklist

  • The new code clear, easy to read and well commented.
  • New code does not duplicate the functions of builtin or popular libraries.
  • An LLM was used to review the new code and look for simplifications.
  • New classes and functions contain docstrings explaining what they provide.
  • All new code is covered by relevant tests.
  • Documentation has been updated regarding these changes.
  • Dependencies update in the project.toml have been mirrored in the Debian package build script packaging/Makefile

Changes

Ensure to force same int types for ports forwarded when searching and applying the firewall rules.

How to test

Create an instance, then un-allocate it and then re-allocate the ame instance or another one and use the command nft list ruleset to see the firewall rules. Only the proper rules should appear for every VM.

nesitor and others added 3 commits November 26, 2025 00:37
…type miss-matching. It's the first step were all the rules are removed and new ones are created all the time. This need to be improved.
@nesitor nesitor self-assigned this Nov 26, 2025
@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 9.90991% with 100 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.11%. Comparing base (e2f64f0) to head (4372f97).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/aleph/vm/network/firewall.py 6.38% 44 Missing ⚠️
src/aleph/vm/orchestrator/views/__init__.py 6.38% 44 Missing ⚠️
src/aleph/vm/models.py 41.66% 6 Missing and 1 partial ⚠️
src/aleph/vm/pool.py 0.00% 4 Missing ⚠️
src/aleph/vm/network/port_availability_checker.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #849      +/-   ##
==========================================
- Coverage   64.76%   64.11%   -0.66%     
==========================================
  Files          88       88              
  Lines        8185     8281      +96     
  Branches      739      752      +13     
==========================================
+ Hits         5301     5309       +8     
- Misses       2652     2739      +87     
- Partials      232      233       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…e an authenticated endpoint that allows to clean completely the network setting and re-create it from the existing running VMs.
Copy link
Member

@1yam 1yam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nesitor nesitor merged commit edc5e67 into main Nov 27, 2025
34 of 37 checks passed
@nesitor nesitor deleted the andres-fix-solve_duplicated_firewall_redirects branch November 27, 2025 14:58
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.

3 participants