You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sw...@apache.org on 2016/06/28 15:19:53 UTC

[1/2] git commit: updated refs/heads/4.7 to 8eedead

Repository: cloudstack
Updated Branches:
  refs/heads/4.7 3952e3e83 -> 8eedeade7


CLOUDSTACK-9353: [XenServer] Fixed VM migration with storage


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

Branch: refs/heads/4.7
Commit: 458264aac843d4d21500a5f0ab49f8e6a00410cd
Parents: 9275ba2
Author: Anshul Gangwar <an...@accelerite.com>
Authored: Wed Jun 15 11:38:03 2016 +0530
Committer: Anshul Gangwar <an...@accelerite.com>
Committed: Fri Jun 24 09:31:20 2016 +0530

----------------------------------------------------------------------
 .../XenServer610MigrateWithStorageCommandWrapper.java | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/458264aa/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xen610/XenServer610MigrateWithStorageCommandWrapper.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xen610/XenServer610MigrateWithStorageCommandWrapper.java b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xen610/XenServer610MigrateWithStorageCommandWrapper.java
index 2a79d26..f3f9f64 100644
--- a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xen610/XenServer610MigrateWithStorageCommandWrapper.java
+++ b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xen610/XenServer610MigrateWithStorageCommandWrapper.java
@@ -24,6 +24,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import com.cloud.utils.Pair;
 import org.apache.cloudstack.storage.to.VolumeObjectTO;
 import org.apache.log4j.Logger;
 
@@ -60,7 +61,7 @@ public final class XenServer610MigrateWithStorageCommandWrapper extends CommandW
     public Answer execute(final MigrateWithStorageCommand command, final XenServer610Resource xenServer610Resource) {
         final Connection connection = xenServer610Resource.getConnection();
         final VirtualMachineTO vmSpec = command.getVirtualMachine();
-        final Map<VolumeTO, StorageFilerTO> volumeToFiler = command.getVolumeToFiler();
+        final List<Pair<VolumeTO, StorageFilerTO>> volumeToFiler = command.getVolumeToFilerAsList();
         final String vmName = vmSpec.getName();
         Task task = null;
 
@@ -80,13 +81,14 @@ public final class XenServer610MigrateWithStorageCommandWrapper extends CommandW
             final XsLocalNetwork nativeNetworkForTraffic = xenServer610Resource.getNativeNetworkForTraffic(connection, TrafficType.Storage, null);
             final Network networkForSm = nativeNetworkForTraffic.getNetwork();
 
-            // Create the vif map. The vm stays in the same cluster so we have to pass an empty vif map.
+            // Create the vif map. The  vm stays in the same cluster so we have to pass an empty vif map.
             final Map<VIF, Network> vifMap = new HashMap<VIF, Network>();
             final Map<VDI, SR> vdiMap = new HashMap<VDI, SR>();
-            for (final Map.Entry<VolumeTO, StorageFilerTO> entry : volumeToFiler.entrySet()) {
-                final VolumeTO volume = entry.getKey();
-                final StorageFilerTO sotrageFiler = entry.getValue();
-                vdiMap.put(xenServer610Resource.getVDIbyUuid(connection, volume.getPath()), xenServer610Resource.getStorageRepository(connection, sotrageFiler.getUuid()));
+
+            for (final Pair<VolumeTO, StorageFilerTO> entry : volumeToFiler) {
+                final StorageFilerTO storageFiler = entry.second();
+                final VolumeTO volume = entry.first();
+                vdiMap.put(xenServer610Resource.getVDIbyUuid(connection, volume.getPath()), xenServer610Resource.getStorageRepository(connection, storageFiler.getUuid()));
             }
 
             // Get the vm to migrate.


[2/2] git commit: updated refs/heads/4.7 to 8eedead

Posted by sw...@apache.org.
Merge pull request #1596 from anshul1886/CLOUDSTACK-9353

CLOUDSTACK-9353: [XenServer] Fixed VM migration with storageIn turn this also fixes VM migration with local storage

This PR is created against 4.7 and can be forward merged to future branches also.

* pr/1596:
  CLOUDSTACK-9353: [XenServer] Fixed VM migration with storage

Signed-off-by: Will Stevens <wi...@gmail.com>


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

Branch: refs/heads/4.7
Commit: 8eedeade750394800a536e8d431f6aade1078277
Parents: 3952e3e 458264a
Author: Will Stevens <wi...@gmail.com>
Authored: Tue Jun 28 11:18:57 2016 -0400
Committer: Will Stevens <wi...@gmail.com>
Committed: Tue Jun 28 11:18:58 2016 -0400

----------------------------------------------------------------------
 .../XenServer610MigrateWithStorageCommandWrapper.java | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------