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


##########
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:
   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



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