Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14403 +/- ##
============================================
- Coverage 20.77% 20.77% -0.01%
+ Complexity 20847 20842 -5
============================================
Files 6053 6053
Lines 548222 548232 +10
Branches 73236 73237 +1
============================================
- Hits 113896 113885 -11
- Misses 420984 421004 +20
- Partials 13342 13343 +1
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:
|
| ArrayList<String> failedChecks = new ArrayList<>(); | ||
| for (String failedCheckName : failingChecks) { | ||
| RouterHealthCheckResultVO routerHealthCheckResultVO = routerHealthCheckResultDao.getRouterHealthCheckResult(router.getId(), failedCheckName, null); | ||
| String failedCheckDetails = routerHealthCheckResultVO.getParsedCheckDetails(); |
There was a problem hiding this comment.
what happens if there is no saved result for a failing check? looks like it crashes here and the router recreate and the other routers get skipped
There was a problem hiding this comment.
Hello, @Damans227
I checked the behavior that you mentioned about no saved result for a failing check and could not find a flow where this happens.
In the code, the router checks are parsed and saved to the database in the getFailingChecks method, before this piece of code. Even in scenarios where the command is not received by the router, or the router's file system is not writable, there is a separate handling to tackle those. This means that, even if the router does not have any check yet, the new checks will be persisted before the failing check handling is done.
To validate this, I created a VR locally and filled its volume with a dummy file created by dd, for the disk_space_check.py test to fail. With no tests registered yet, I requested fresh checks and validated with the IDE's debugging tool that all the checks were persisted before the handling part.
Have you seen any specific scenario of this happening, so we can test this solution and validate its behavior?
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
# Conflicts: # server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
Description
When one or more VR health checks fail and alert notifications are configured in the environment, an email that does not include details about which tests failed is sent. The message has been rewritten to display which health checks have failed.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
Alert received
How Has This Been Tested?
Build the packages and installed them. Then, I created a new Isolated network and deploy a VM on it. The VR was accessed by console and the
openssh-serverpackage was purged. After that, I requested for fresh checks. As it could not access the VR via SSH, all the tests failed and an email was sent informing about the failure to access the Instance (image attached to the Screenshots section)