You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/06/25 05:07:55 UTC
[cloudstack] branch 4.14 updated: vr: fix backup router health
check (#4171)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.14
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.14 by this push:
new b534d2b vr: fix backup router health check (#4171)
b534d2b is described below
commit b534d2bdff629ee2706c185eab728fe61cb46fd6
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Thu Jun 25 10:37:42 2020 +0530
vr: fix backup router health check (#4171)
Fixes #4163
Added excluded tests in the code for BACKUP router.
Signed-off-by: Abhishek Kumar <ab...@gmail.com>
---
.../cloud/network/router/VirtualNetworkApplianceManagerImpl.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index c895307..0769258 100644
--- a/server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -278,6 +278,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V
Configurable, StateListener<VirtualMachine.State, VirtualMachine.Event, VirtualMachine> {
private static final Logger s_logger = Logger.getLogger(VirtualNetworkApplianceManagerImpl.class);
private static final String CONNECTIVITY_TEST = "connectivity.test";
+ private static final String BACKUP_ROUTER_EXCLUDED_TESTS = "gateways_check.py";
@Inject private EntityManager _entityMgr;
@Inject private DataCenterDao _dcDao;
@@ -1632,7 +1633,11 @@ Configurable, StateListener<VirtualMachine.State, VirtualMachine.Event, VirtualM
command.setAccessDetail(SetMonitorServiceCommand.ROUTER_HEALTH_CHECKS_ENABLED, RouterHealthChecksEnabled.value().toString());
command.setAccessDetail(SetMonitorServiceCommand.ROUTER_HEALTH_CHECKS_BASIC_INTERVAL, RouterHealthChecksBasicInterval.value().toString());
command.setAccessDetail(SetMonitorServiceCommand.ROUTER_HEALTH_CHECKS_ADVANCED_INTERVAL, RouterHealthChecksAdvancedInterval.value().toString());
- command.setAccessDetail(SetMonitorServiceCommand.ROUTER_HEALTH_CHECKS_EXCLUDED, RouterHealthChecksToExclude.valueIn(router.getDataCenterId()));
+ String excludedTests = RouterHealthChecksToExclude.valueIn(router.getDataCenterId());
+ if (router.getIsRedundantRouter() && RedundantState.BACKUP.equals(router.getRedundantState())) {
+ excludedTests = excludedTests.isEmpty() ? BACKUP_ROUTER_EXCLUDED_TESTS : excludedTests + "," + BACKUP_ROUTER_EXCLUDED_TESTS;
+ }
+ command.setAccessDetail(SetMonitorServiceCommand.ROUTER_HEALTH_CHECKS_EXCLUDED, excludedTests);
command.setHealthChecksConfig(getRouterHealthChecksConfig(router));
command.setReconfigureAfterUpdate(reconfigure);
command.setDeleteFromProcessedCache(deleteFromProcessedCache); // As part of updating