You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2017/07/27 09:17:25 UTC

[cloudstack] branch 4.9 updated: CLOUDSTACK-9569: add router.aggregation.command.each.timeout to agent.properties (#1933)

This is an automated email from the ASF dual-hosted git repository.

bhaisaab pushed a commit to branch 4.9
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.9 by this push:
     new 7ed3179  CLOUDSTACK-9569: add router.aggregation.command.each.timeout to agent.properties (#1933)
7ed3179 is described below

commit 7ed3179bd168532fbfde3847bec5372ba76e4dec
Author: Abhinandan Prateek <ab...@shapeblue.com>
AuthorDate: Thu Jul 27 14:47:20 2017 +0530

    CLOUDSTACK-9569: add router.aggregation.command.each.timeout to agent.properties (#1933)
---
 agent/conf/agent.properties                                      | 4 ++++
 .../agent/resource/virtualnetwork/VirtualRoutingResource.java    | 9 ++++++---
 server/src/com/cloud/server/StatsCollector.java                  | 4 ++--
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/agent/conf/agent.properties b/agent/conf/agent.properties
index daad05f..8b99ee3 100644
--- a/agent/conf/agent.properties
+++ b/agent/conf/agent.properties
@@ -152,3 +152,7 @@ hypervisor.type=kvm
 # kvmclock.disable=false
 # Some newer linux kernels are incapable of reliably migrating vms with kvmclock
 # This is a workaround for the bug, admin can set this to true per-host
+#
+#router.aggregation.command.each.timeout=600
+#timeout value for aggregation commands send to virtual router
+#
diff --git a/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
index 96dea5d..e424bac 100644
--- a/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
+++ b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
@@ -283,7 +283,10 @@ public class VirtualRoutingResource {
         _port = NumbersUtil.parseInt(value, 3922);
 
         value = (String)params.get("router.aggregation.command.each.timeout");
-        _eachTimeout = Duration.standardSeconds(NumbersUtil.parseInt(value, 10));
+        _eachTimeout = Duration.standardSeconds(NumbersUtil.parseInt(value, (int)VRScripts.VR_SCRIPT_EXEC_TIMEOUT.getStandardSeconds()));
+        if (s_logger.isDebugEnabled()){
+            s_logger.debug("The router.aggregation.command.each.timeout in seconds is set to " + _eachTimeout.getStandardSeconds());
+        }
 
         if (_vrDeployer == null) {
             throw new ConfigurationException("Unable to find the resource for VirtualRouterDeployer!");
@@ -387,8 +390,8 @@ public class VirtualRoutingResource {
                 ScriptConfigItem scriptConfigItem = new ScriptConfigItem(VRScripts.VR_CFG, "-c " + VRScripts.CONFIG_CACHE_LOCATION + cfgFileName);
                 // 120s is the minimal timeout
                 Duration timeout = _eachTimeout.withDurationAdded(_eachTimeout.getStandardSeconds(), answerCounts);
-                if (timeout.isShorterThan(VRScripts.VR_SCRIPT_EXEC_TIMEOUT)) {
-                    timeout = VRScripts.VR_SCRIPT_EXEC_TIMEOUT;
+                if (s_logger.isDebugEnabled()){
+                    s_logger.debug("Aggregate action timeout in seconds is " + timeout.getStandardSeconds());
                 }
 
                 ExecutionResult result = applyConfigToVR(cmd.getRouterAccessIp(), fileConfigItem);
diff --git a/server/src/com/cloud/server/StatsCollector.java b/server/src/com/cloud/server/StatsCollector.java
index b5d67c7..58d9d33 100644
--- a/server/src/com/cloud/server/StatsCollector.java
+++ b/server/src/com/cloud/server/StatsCollector.java
@@ -439,7 +439,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc
         @Override
         protected void runInContext() {
             try {
-                s_logger.debug("HostOutOfBandManagementStatsCollector is running...");
+                s_logger.trace("HostOutOfBandManagementStatsCollector is running...");
                 List<OutOfBandManagementVO> outOfBandManagementHosts = outOfBandManagementDao.findAllByManagementServer(ManagementServerNode.getManagementServerId());
                 if (outOfBandManagementHosts == null) {
                     return;
@@ -469,7 +469,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc
         @Override
         protected void runInContext() {
             try {
-                s_logger.debug("VmStatsCollector is running...");
+                s_logger.trace("VmStatsCollector is running...");
 
                 SearchCriteria<HostVO> sc = _hostDao.createSearchCriteria();
                 sc.addAnd("status", SearchCriteria.Op.EQ, Status.Up.toString());

-- 
To stop receiving notification emails like this one, please contact
['"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>'].