cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject [1/2] git commit: updated refs/heads/4.1 to f0f7b25
Date Wed, 17 Apr 2013 19:19:48 GMT
Updated Branches:
  refs/heads/4.1 9b15a4719 -> f0f7b252e


CLOUDSTACK-2067: Throw LibvirtException so that VM start failures are
noticed, fix related NPE that can happen when VM starts fail

Signed-off-by: Chip Childers <chip.childers@gmail.com>


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

Branch: refs/heads/4.1
Commit: 0c4048cbbc26425f205eecb5d70fe3bc247a8522
Parents: 9b15a47
Author: Marcus Sorensen <shadowsor@gmail.com>
Authored: Wed Apr 17 20:09:13 2013 +0100
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Wed Apr 17 20:09:13 2013 +0100

----------------------------------------------------------------------
 .../kvm/resource/LibvirtComputingResource.java     |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0c4048cb/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 373445e..e6db9bf 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -985,8 +985,7 @@ ServerResource {
             */
             dm = conn.domainCreateXML(domainXML, 0);
         } catch (final LibvirtException e) {
-            s_logger.warn("Failed to start domain " + vmName + ": "
-                    + e.getMessage());
+            throw e;
         }
 
         return null;
@@ -4234,9 +4233,11 @@ ServerResource {
     }
 
     private void cleanupVMNetworks(Connect conn, List<InterfaceDef> nics) {
-        for (InterfaceDef nic : nics) {
-            if (nic.getHostNetType() == hostNicType.VNET) {
-                cleanupVnet(conn, getVnetIdFromBrName(nic.getBrName()));
+        if (nics != null) {
+            for (InterfaceDef nic : nics) {
+                if (nic.getHostNetType() == hostNicType.VNET) {
+                    cleanupVnet(conn, getVnetIdFromBrName(nic.getBrName()));
+                }
             }
         }
     }


Mime
View raw message