Repository navigation
Conversation
…h check alert The alert only gave the router name and UUID. The subject now carries the guest network(s) or VPC, the public IP and the failing check names; the body lists zone, account, host, state, every NIC with its network and IP, and the details of each failing check. Signed-off-by: James Peru <jmsperu@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14879 +/- ##
============================================
+ Coverage 20.80% 20.93% +0.12%
- Complexity 20925 21155 +230
============================================
Files 6053 6057 +4
Lines 548466 549621 +1155
Branches 73283 78262 +4979
============================================
+ Hits 114129 115042 +913
- Misses 420977 421115 +138
- Partials 13360 13464 +104
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Description
When router health checks fail, the alert only names the router:
To find out which network is affected and what is actually failing, an operator has to look up the router, its networks and its health check results by hand. With many routers this slows down the response to every alert.
This PR builds the alert from data CloudStack already has:
router_health_check.The subject and body are kept within the sizes of the
alert.subject(999) andalert.content(5000) columns, and each check's details are trimmed to 1000 characters. If any lookup fails, the alert falls back to the existing text, so a health check alert is never lost.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
How Has This Been Tested?
Unit tests in
VirtualNetworkApplianceManagerImplTest: the subject and body for a router with guest, control and public NICs and a failing check with details, a body kept within 5000 characters when many checks report long details, and the fallback when a lookup throws. All 11 tests in the class pass.Lab test on 4.22.1.1 (KVM, Ubuntu 24.04), with the change applied to the management server: on an isolated network router,
dnsmasqwas stopped and masked, thengetRouterHealthCheckResults performfreshchecks=truewas called.Before:
After, subject:
After, body:
The "Checking failed health checks to see if router needs recreate" log line now carries the same subject. After the test
dnsmasqwas restored and the router went back to healthy.