anuragaw commented on a change in pull request #3575: [WIP DO NOT MERGE] Health
check feature for virtual router
URL: https://github.com/apache/cloudstack/pull/3575#discussion_r367913605
##########
File path: server/src/main/java/com/cloud/api/query/QueryManagerImpl.java
##########
@@ -1174,18 +1174,15 @@
Pair<List<DomainRouterJoinVO>, Integer> result =
searchForRoutersInternal(cmd, cmd.getId(), cmd.getRouterName(), cmd.getState(),
cmd.getZoneId(), cmd.getPodId(), cmd.getClusterId(),
cmd.getHostId(), cmd.getKeyword(), cmd.getNetworkId(),
cmd.getVpcId(), cmd.getForVpc(), cmd.getRole(), cmd.getVersion());
ListResponse<DomainRouterResponse> response = new
ListResponse<DomainRouterResponse>();
- if (!VirtualNetworkApplianceManager.RouterHealthChecksEnabled.value())
{
- s_logger.debug("Skipping health checks data in router as
router.health.checks.enabled is false for router");
- return response;
- }
-
List<DomainRouterResponse> routerResponses =
ViewResponseHelper.createDomainRouterResponse(result.first().toArray(new
DomainRouterJoinVO[result.first().size()]));
for (DomainRouterResponse res : routerResponses) {
DomainRouterVO resRouter = _routerDao.findByUuid(res.getId());
-
res.setHealthChecksFailed(routerHealthCheckResultDao.hasFailingChecks(resRouter.getId()));
- if (cmd.shouldFetchHealthCheckResults()) {
-
res.setHealthCheckResults(responseGenerator.createHealthCheckResponse(resRouter,
- new
ArrayList<>(routerHealthCheckResultDao.getHealthCheckResults(resRouter.getId()))));
+ if
(VirtualNetworkApplianceManager.RouterHealthChecksEnabled.value()) {
Review comment:
Does not depend but we want to trim the response for each router based on
this flag being true/false
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services