cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [1/3] git commit: updated refs/heads/master to 99bb500
Date Tue, 25 Oct 2016 10:34:14 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master af8b223fd -> 99bb50072


Remove dangerous prototype of applyConfigToVR


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ddfc3681
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ddfc3681
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ddfc3681

Branch: refs/heads/master
Commit: ddfc368117a3548cdf198d4f19f484365cf99aa8
Parents: 5d4b5fd
Author: Aaron Brady <aaron@insom.me.uk>
Authored: Sat Mar 26 00:38:57 2016 +0000
Committer: Aaron Brady <aaron@insom.me.uk>
Committed: Sat Mar 26 00:39:04 2016 +0000

----------------------------------------------------------------------
 .../resource/virtualnetwork/VirtualRoutingResource.java | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ddfc3681/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
index f271e72..2d22b14 100644
--- a/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
+++ b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
@@ -152,11 +152,10 @@ public class VirtualRoutingResource {
         }
     }
 
-    private ExecutionResult applyConfigToVR(String routerAccessIp, ConfigItem c) {
-        return applyConfigToVR(routerAccessIp, c, VRScripts.DEFAULT_EXECUTEINVR_TIMEOUT);
-    }
-
     private ExecutionResult applyConfigToVR(String routerAccessIp, ConfigItem c, int timeout)
{
+        if (timeout < VRScripts.DEFAULT_EXECUTEINVR_TIMEOUT) {
+            timeout = VRScripts.DEFAULT_EXECUTEINVR_TIMEOUT;
+        }
         if (c instanceof FileConfigItem) {
             FileConfigItem configItem = (FileConfigItem)c;
             return _vrDeployer.createFileInVR(routerAccessIp, configItem.getFilePath(), configItem.getFileName(),
configItem.getFileContents());
@@ -180,7 +179,7 @@ public class VirtualRoutingResource {
         boolean finalResult = false;
         for (ConfigItem configItem : cfg) {
             long startTimestamp = System.currentTimeMillis();
-            ExecutionResult result = applyConfigToVR(cmd.getRouterAccessIp(), configItem);
+            ExecutionResult result = applyConfigToVR(cmd.getRouterAccessIp(), configItem,
VRScripts.DEFAULT_EXECUTEINVR_TIMEOUT);
             if (s_logger.isDebugEnabled()) {
                 long elapsed = System.currentTimeMillis() - startTimestamp;
                 s_logger.debug("Processing " + configItem + " took " + elapsed + "ms");
@@ -375,9 +374,6 @@ public class VirtualRoutingResource {
                 ScriptConfigItem scriptConfigItem = new ScriptConfigItem(VRScripts.VR_CFG,
"-c " + VRScripts.CONFIG_CACHE_LOCATION + cfgFileName);
                 // 120s is the minimal timeout
                 int timeout = answerCounts * _eachTimeout;
-                if (timeout < 120) {
-                    timeout = 120;
-                }
 
                 ExecutionResult result = applyConfigToVR(cmd.getRouterAccessIp(), fileConfigItem,
timeout);
                 if (!result.isSuccess()) {


Mime
View raw message