Skip to content

Fix issue with HaProxy domain mapping #826

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

Merged
merged 4 commits into from
Jul 29, 2025
Merged

Conversation

olethanh
Copy link
Collaborator

@olethanh olethanh commented Jul 29, 2025

Related JIRA ticket ALEPH-636
Problem:
Haproxy was not properly configured. And request could go to any server

Analysis:
Previously we added backend server via but not the mapping.
And the map file was not correctly configured

Solution:
Update HaProxy mapping as well as backend server via the control socket
Fix the way mapping is done: Target should be server name not addr:port
Update the haproxy config to only use the fallback server if no mapping if found, otherwise it could be randomly us
Update tests

@olethanh olethanh force-pushed the ol-ALEPH-haproxy-mapping branch from 42a7c15 to 24d515f Compare July 29, 2025 12:31
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

❌ Patch coverage is 66.30435% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.57%. Comparing base (d76e5dc) to head (e5dd88a).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/aleph/vm/haproxy.py 56.86% 17 Missing and 5 partials ⚠️
src/aleph/vm/network/port_availability_checker.py 33.33% 6 Missing ⚠️
src/aleph/vm/orchestrator/views/__init__.py 0.00% 2 Missing ⚠️
src/aleph/vm/models.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #826      +/-   ##
==========================================
- Coverage   64.80%   64.57%   -0.23%     
==========================================
  Files          87       87              
  Lines        8021     8048      +27     
  Branches      716      722       +6     
==========================================
- Hits         5198     5197       -1     
- Misses       2590     2624      +34     
+ Partials      233      227       -6     

☔ 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.

olethanh added 4 commits July 29, 2025 15:12
Problem:
Haproxy was not properly configured. And request could go to any server

Analysis:
Previously we added backend server via but not the mapping.
And the map file was not correctly configured

Solution:
Update HaProxy mapping as well as backend server via the control socket
Fix the way mapping is done: Target should be server name not addr:port
Update the haproxy config to only use the fallback server if no mapping if found, otherwise it could be randomly used.
Update tests
@olethanh olethanh force-pushed the ol-ALEPH-haproxy-mapping branch from 24d515f to e5dd88a Compare July 29, 2025 13:21
@nesitor nesitor merged commit 05a9072 into main Jul 29, 2025
49 of 54 checks passed
@nesitor nesitor deleted the ol-ALEPH-haproxy-mapping branch July 29, 2025 14:55
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.

2 participants