You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by an...@apache.org on 2014/01/31 03:08:08 UTC
[05/11] git commit: updated refs/heads/4.3 to e089b91
CLOUDSTACK-5660: Migrate vm live migration succeeds but throws error as "Failed to migrate the system vm".
(cherry picked from commit cff312ef743763c69b0c3b0cfd9faf906f3cf22c)
Signed-off-by: Animesh Chaturvedi <an...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d7e1d38d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d7e1d38d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d7e1d38d
Branch: refs/heads/4.3
Commit: d7e1d38d48f7362944092755e0ea0b5f025aab8b
Parents: ccc8aa7
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Thu Jan 30 16:17:19 2014 +0530
Committer: Animesh Chaturvedi <an...@apache.org>
Committed: Thu Jan 30 17:44:48 2014 -0800
----------------------------------------------------------------------
server/src/com/cloud/vm/UserVmManagerImpl.java | 7 ++++++-
ui/scripts/system.js | 12 ++++++------
2 files changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d7e1d38d/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 363c663..d9923d2 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -4216,7 +4216,12 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
collectVmDiskStatistics(uservm);
}
_itMgr.migrate(vm.getUuid(), srcHostId, dest);
- return _vmDao.findById(vmId);
+ VMInstanceVO vmInstance = _vmInstanceDao.findById(vmId);
+ if (vmInstance.getType().equals(VirtualMachine.Type.User)) {
+ return _vmDao.findById(vmId);
+ } else {
+ return vmInstance;
+ }
}
private boolean checkIfHostIsDedicated(HostVO host) {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d7e1d38d/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 960f1aa..72f9e33 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -2508,7 +2508,7 @@
getUpdatedItem: function(json) {
//return json.queryasyncjobresultresponse.jobresult.systemvminstance; //not all properties returned in systemvminstance
$.ajax({
- url: createURL("listRouters&id=" + json.queryasyncjobresultresponse.jobresult.systemvminstance.id),
+ url: createURL("listRouters&id=" + json.queryasyncjobresultresponse.jobresult.systemvm.id),
dataType: "json",
async: false,
success: function(json) {
@@ -3030,7 +3030,7 @@
getUpdatedItem: function(json) {
//return json.queryasyncjobresultresponse.jobresult.systemvminstance; //not all properties returned in systemvminstance
$.ajax({
- url: createURL("listInternalLoadBalancerVMs&id=" + json.queryasyncjobresultresponse.jobresult.systemvminstance.id),
+ url: createURL("listInternalLoadBalancerVMs&id=" + json.queryasyncjobresultresponse.jobresult.systemvm.id),
dataType: "json",
async: false,
success: function(json) {
@@ -3624,7 +3624,7 @@
getUpdatedItem: function(json) {
//return json.queryasyncjobresultresponse.jobresult.systemvminstance; //not all properties returned in systemvminstance
$.ajax({
- url: createURL("listRouters&id=" + json.queryasyncjobresultresponse.jobresult.systemvminstance.id),
+ url: createURL("listRouters&id=" + json.queryasyncjobresultresponse.jobresult.systemvm.id),
dataType: "json",
async: false,
success: function(json) {
@@ -6788,7 +6788,7 @@
getUpdatedItem: function(json) {
//return json.queryasyncjobresultresponse.jobresult.systemvminstance; //not all properties returned in systemvminstance
$.ajax({
- url: createURL("listSystemVms&id=" + json.queryasyncjobresultresponse.jobresult.systemvminstance.id),
+ url: createURL("listSystemVms&id=" + json.queryasyncjobresultresponse.jobresult.systemvm.id),
dataType: "json",
async: false,
success: function(json) {
@@ -7941,7 +7941,7 @@
getUpdatedItem: function(json) {
//return json.queryasyncjobresultresponse.jobresult.systemvminstance; //not all properties returned in systemvminstance
$.ajax({
- url: createURL("listRouters&id=" + json.queryasyncjobresultresponse.jobresult.systemvminstance.id),
+ url: createURL("listRouters&id=" + json.queryasyncjobresultresponse.jobresult.systemvm.id),
dataType: "json",
async: false,
success: function(json) {
@@ -9167,7 +9167,7 @@
getUpdatedItem: function(json) {
//return json.queryasyncjobresultresponse.jobresult.systemvminstance; //not all properties returned in systemvminstance
$.ajax({
- url: createURL("listSystemVms&id=" + json.queryasyncjobresultresponse.jobresult.systemvminstance.id),
+ url: createURL("listSystemVms&id=" + json.queryasyncjobresultresponse.jobresult.systemvm.id),
dataType: "json",
async: false,
success: function(json) {