Damans227 commented on code in PR #14403:
URL: https://github.com/apache/cloudstack/pull/14403#discussion_r4696120224


##########
server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java:
##########
@@ -1160,23 +1159,33 @@ private void handleFailingChecks(DomainRouterVO router, 
List<String> failingChec
         if (CollectionUtils.isEmpty(failingChecks)) {
             return;
         }
+        String subject = String.format("Failed health checks on router [%s]", 
router.getName());
+        String alertMessage = String.format("The following health checks have 
failed on router [%s] with UUID [%s]: ", router.getName(), router.getUuid());
+        ArrayList<String> failedChecks = new ArrayList<>();
+        for (String failedCheckName : failingChecks) {
+            RouterHealthCheckResultVO routerHealthCheckResultVO = 
routerHealthCheckResultDao.getRouterHealthCheckResult(router.getId(), 
failedCheckName, null);
+            String failedCheckDetails = 
routerHealthCheckResultVO.getParsedCheckDetails();

Review Comment:
   @erikbocks makes sense when the router sends good results. the failing list 
and the results are two separate files on the router though, so if the results 
file is empty or broken (like when the disk fills up) nothing gets saved and 
this line crashes. can we skip the details for a check with no saved result 
instead?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to