cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject git commit: updated refs/heads/master-6-17-stable to 40d3b71
Date Tue, 18 Jun 2013 23:58:21 GMT
Updated Branches:
  refs/heads/master-6-17-stable b0f241dfd -> 40d3b713c


CLOUDSTACK-2900: Ubuntu 13.04 - Migrate Virtual Router fail - Unable to find the VM by id=

Changes:
- Have to search the vm_instance table to find the instance


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

Branch: refs/heads/master-6-17-stable
Commit: 40d3b713ced2cca22aa08402eb07c136a8ac9060
Parents: b0f241d
Author: Prachi Damle <prachi@cloud.com>
Authored: Mon Jun 17 16:58:42 2013 -0700
Committer: Prachi Damle <prachi@cloud.com>
Committed: Tue Jun 18 16:57:46 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/vm/UserVmManagerImpl.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/40d3b713/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index 44a7d06..e8ea024 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -3804,7 +3804,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Use
                     "No permission to migrate VM, Only Root Admin can migrate a VM!");
         }
 
-        UserVmVO vm = _vmDao.findById(vmId);
+        VMInstanceVO vm = _vmInstanceDao.findById(vmId);
         if (vm == null) {
             throw new InvalidParameterValueException(
                     "Unable to find the VM by id=" + vmId);
@@ -3895,7 +3895,10 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Use
                             + " already has max Running VMs(count includes system VMs), cannot
migrate to this host");
         }
 
-        collectVmDiskStatistics(vm);
+        UserVmVO uservm = _vmDao.findById(vmId);
+        if (uservm != null) {
+            collectVmDiskStatistics(uservm);
+        }
         VMInstanceVO migratedVm = _itMgr.migrate(vm, srcHostId, dest);
         return migratedVm;
     }


Mime
View raw message