Skip to content

Commit 7ed3179

Browse files
abhinandanprateekRohit Yadav
authored andcommitted
CLOUDSTACK-9569: add router.aggregation.command.each.timeout to agent.properties (#1933)
1 parent 03aca88 commit 7ed3179

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

agent/conf/agent.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,7 @@ hypervisor.type=kvm
152152
# kvmclock.disable=false
153153
# Some newer linux kernels are incapable of reliably migrating vms with kvmclock
154154
# This is a workaround for the bug, admin can set this to true per-host
155+
#
156+
#router.aggregation.command.each.timeout=600
157+
#timeout value for aggregation commands send to virtual router
158+
#

core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,10 @@ public boolean configure(final String name, final Map<String, Object> params) th
283283
_port = NumbersUtil.parseInt(value, 3922);
284284

285285
value = (String)params.get("router.aggregation.command.each.timeout");
286-
_eachTimeout = Duration.standardSeconds(NumbersUtil.parseInt(value, 10));
286+
_eachTimeout = Duration.standardSeconds(NumbersUtil.parseInt(value, (int)VRScripts.VR_SCRIPT_EXEC_TIMEOUT.getStandardSeconds()));
287+
if (s_logger.isDebugEnabled()){
288+
s_logger.debug("The router.aggregation.command.each.timeout in seconds is set to " + _eachTimeout.getStandardSeconds());
289+
}
287290

288291
if (_vrDeployer == null) {
289292
throw new ConfigurationException("Unable to find the resource for VirtualRouterDeployer!");
@@ -387,8 +390,8 @@ private Answer execute(AggregationControlCommand cmd) {
387390
ScriptConfigItem scriptConfigItem = new ScriptConfigItem(VRScripts.VR_CFG, "-c " + VRScripts.CONFIG_CACHE_LOCATION + cfgFileName);
388391
// 120s is the minimal timeout
389392
Duration timeout = _eachTimeout.withDurationAdded(_eachTimeout.getStandardSeconds(), answerCounts);
390-
if (timeout.isShorterThan(VRScripts.VR_SCRIPT_EXEC_TIMEOUT)) {
391-
timeout = VRScripts.VR_SCRIPT_EXEC_TIMEOUT;
393+
if (s_logger.isDebugEnabled()){
394+
s_logger.debug("Aggregate action timeout in seconds is " + timeout.getStandardSeconds());
392395
}
393396

394397
ExecutionResult result = applyConfigToVR(cmd.getRouterAccessIp(), fileConfigItem);

server/src/com/cloud/server/StatsCollector.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ class HostOutOfBandManagementStatsCollector extends ManagedContextRunnable {
439439
@Override
440440
protected void runInContext() {
441441
try {
442-
s_logger.debug("HostOutOfBandManagementStatsCollector is running...");
442+
s_logger.trace("HostOutOfBandManagementStatsCollector is running...");
443443
List<OutOfBandManagementVO> outOfBandManagementHosts = outOfBandManagementDao.findAllByManagementServer(ManagementServerNode.getManagementServerId());
444444
if (outOfBandManagementHosts == null) {
445445
return;
@@ -469,7 +469,7 @@ class VmStatsCollector extends ManagedContextRunnable {
469469
@Override
470470
protected void runInContext() {
471471
try {
472-
s_logger.debug("VmStatsCollector is running...");
472+
s_logger.trace("VmStatsCollector is running...");
473473

474474
SearchCriteria<HostVO> sc = _hostDao.createSearchCriteria();
475475
sc.addAnd("status", SearchCriteria.Op.EQ, Status.Up.toString());

0 commit comments

Comments
 (0)