cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yas...@apache.org
Subject git commit: CS-15116: When GetDomRVersion failed, let VR creation fail
Date Fri, 01 Jun 2012 01:57:17 GMT
Updated Branches:
  refs/heads/master 96e7e3d1c -> 79c276ba6


CS-15116: When GetDomRVersion failed, let VR creation fail

Because there are more commands after GetDomRVersion command. Though
GetDomRVersion command itself is not that critical, the commands after it may
including DHCP and firewall related commands. The failure of GetDomRVersion
command would result in the following commands fail to be executed. So it should
fail, and fail loudly.


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

Branch: refs/heads/master
Commit: 79c276ba6bc9cbd3929e035c036d32b062cc267b
Parents: 96e7e3d
Author: Sheng Yang <sheng.yang@citrix.com>
Authored: Thu May 31 18:54:08 2012 -0700
Committer: Sheng Yang <sheng.yang@citrix.com>
Committed: Thu May 31 18:57:11 2012 -0700

----------------------------------------------------------------------
 .../router/VirtualNetworkApplianceManagerImpl.java |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/79c276ba/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index c85b3c7..d044d4f 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -1936,19 +1936,21 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
             result = false;
         }
         if (result == false) {
-            return false;
+            return result;
         }
         answer = cmds.getAnswer("getDomRVersion");
         if (answer != null && answer instanceof GetDomRVersionAnswer) {
             GetDomRVersionAnswer versionAnswer = (GetDomRVersionAnswer)answer;
             if (answer == null || !answer.getResult()) {
-                /* Try to push on because it's not a critical error */
-                s_logger.warn("Unable to get the template/scripts version of router " + router.getInstanceName()
+ " due to: " + versionAnswer.getDetails() + ", but we would continue");
+                s_logger.warn("Unable to get the template/scripts version of router " + router.getInstanceName()
+ " due to: " + versionAnswer.getDetails());
+                result = false;
             } else {
                 router.setTemplateVersion(versionAnswer.getTemplateVersion());
                 router.setScriptsVersion(versionAnswer.getScriptsVersion());
                 router = _routerDao.persist(router);
             }
+        } else {
+            result = false;
         }
 
         return result;


Mime
View raw message