cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [6/8] git commit: updated refs/heads/4.5 to f506f7c
Date Fri, 07 Nov 2014 00:00:47 GMT
should not duplicate vm instance id, during the volume migration

Conflicts:
	engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java


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

Branch: refs/heads/4.5
Commit: 885bba926cf1c21c8222a8a014445c0207878c96
Parents: ffdb38c
Author: Edison Su <sudison@gmail.com>
Authored: Thu Oct 30 21:27:51 2014 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Thu Nov 6 15:36:58 2014 -0800

----------------------------------------------------------------------
 engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java        | 3 +++
 .../org/apache/cloudstack/storage/volume/VolumeServiceImpl.java   | 1 +
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/885bba92/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
index fb93610..4ad196c 100755
--- a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
@@ -594,8 +594,11 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long>
implements Vol
             VolumeVO srcVol = findById(srcVolId);
             VolumeVO destVol = findById(destVolId);
             String uuid = srcVol.getUuid();
+            Long instanceId = srcVol.getInstanceId();
             srcVol.setUuid(null);
+            srcVol.setInstanceId(null);
             destVol.setUuid(uuid);
+            destVol.setInstanceId(instanceId);
             update(srcVolId, srcVol);
             update(destVolId, destVol);
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/885bba92/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index 1297da9..7e3239f 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -830,6 +830,7 @@ public class VolumeServiceImpl implements VolumeService {
         }
 
         VolumeVO newVol = new VolumeVO(volume);
+        newVol.setInstanceId(null);
         newVol.setPoolId(pool.getId());
         newVol.setFolder(folder);
         newVol.setPodId(pool.getPodId());


Mime
View raw message