fix: activate healthchecks for HAProxy backends#163
Merged
jansdhillon merged 8 commits intoJul 8, 2026
Conversation
There was a problem hiding this comment.
Pull request overview
This PR ensures HAProxy health checks are actually enabled for Landscape’s routed backends by providing the full health-check timing tuple (check_interval, check_rise, check_fall) everywhere it was missing, and by aligning check_path values with real service endpoints (notably updating API to use /api/about).
Changes:
- Add
check_interval=2,check_rise=2,check_fall=3to the appserver, pingserver, message-server, and API HAProxy routes. - Normalize package-upload health-check interval to
2(seconds) and remove the repository route’s unused health-check path. - Expand unit tests to assert per-route
check_pathand health-check timing, and to ensurecheck_portis not set.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/charm.py |
Enables HAProxy health checks for key backends by supplying interval/rise/fall and updates API check path to /api/about; removes repository’s unused check path. |
tests/unit/test_haproxy_route.py |
Updates interval unit expectation (seconds) and adds coverage for per-route check paths and health-check timing configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://warthogs.atlassian.net/browse/LNDENG-4768
Health checks were being ignored for most backends because
interval,rise, andfallwere not set, so HAProxy can't correctly detect when the services are up. The haproxy-route library only activates health checks when all three are provided:This PR adds
check_interval=2,check_rise=2,check_fall=3to all backends that were missing them, and keepscheck_pathset to the path each service actually serves (e.g./pingfor pingserver,/message-systemfor message-server).Manual testing
After the services start, set the HAProxy unit IP to
landscape.localin/etc/hosts. Then verify all routes are healthy:...