-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10196/
-----------------------------------------------------------

Review request for cloudstack, Abhinandan Prateek, edison su, Alex Huang, and 
anthony xu.


Description
-------

Storage motion for Xenserver. FS for the feature 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Enabling+Storage+XenMotion+for+XenServer
Changes made.
    1. Implemented Api listStoragePoolsForMigration as per the specification. 
It lists out all the pools available to which a volume me be migrated
    2. Updated migrateVolume api for allowing migrating volumes of running vms. 
These changes are integrated into the latest storage refactoring changes.
    3. Added the implementation for listHostsForMigration api. It lists the 
hosts to which an instance can be migrated, including hosts from other clusters 
to which an instance may be migrated with storage motion
    4. Added the implementation for migrateVirtualMachineWithVolume api. It 
migrates a VM to another host with its volumes. The host may be in the same 
cluster or another cluster.
    5. Updated the listHosts api for backward compatibility.
    6. Resolved an issue where storage xenmotion of 2nd VM created from the 
same template to a host was failing with duplicate_vm exception. Made changes 
to remove the mac_seed key value pair from other_config when vms are created. 
The mac_seed is auto generated by the api if it is not passed in the record.
    7. Updated the db schema script.
    8. Added the right permissions in commands.properties for the apis.
    9. Marvin tests for testing storage motion. Following scenarios are tested.
    9.1. A virtual machine is migrated to another host. Its volumes are also 
migrated to another storage pool.
    9.2. Just the volumes of a vm are migrated to another storage pool while 
the vm continues to run on the same host.
    10. Unit tests for testing migration of a vm with its volumes.


This addresses bug https://issues.apache.org/jira/browse/CLOUDSTACK-659.


Diffs
-----

  api/src/com/cloud/agent/api/MigrateWithStorageAnswer.java PRE-CREATION 
  api/src/com/cloud/agent/api/MigrateWithStorageCommand.java PRE-CREATION 
  api/src/com/cloud/agent/api/MigrateWithStorageCompleteAnswer.java 
PRE-CREATION 
  api/src/com/cloud/agent/api/MigrateWithStorageCompleteCommand.java 
PRE-CREATION 
  api/src/com/cloud/agent/api/MigrateWithStorageReceiveAnswer.java PRE-CREATION 
  api/src/com/cloud/agent/api/MigrateWithStorageReceiveCommand.java 
PRE-CREATION 
  api/src/com/cloud/agent/api/MigrateWithStorageSendAnswer.java PRE-CREATION 
  api/src/com/cloud/agent/api/MigrateWithStorageSendCommand.java PRE-CREATION 
  api/src/com/cloud/agent/api/storage/MigrateVolumeAnswer.java PRE-CREATION 
  api/src/com/cloud/agent/api/storage/MigrateVolumeCommand.java PRE-CREATION 
  api/src/com/cloud/hypervisor/HypervisorCapabilities.java aff81b0 
  api/src/com/cloud/server/ManagementService.java 1e6ca8d 
  api/src/com/cloud/vm/UserVmService.java 2c33d41 
  api/src/org/apache/cloudstack/api/ApiConstants.java c518830 
  api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java 
29844c3 
  
api/src/org/apache/cloudstack/api/command/admin/host/ListHostsForMigrationCmd.java
 PRE-CREATION 
  
api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsForMigrationCmd.java
 PRE-CREATION 
  
api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java
 PRE-CREATION 
  api/src/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java 
287241a 
  api/src/org/apache/cloudstack/api/response/HostResponse.java f5aa8f9 
  api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java 66dde36 
  client/tomcatconf/commands.properties.in 163c2ce 
  core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java b525a2d 
  
engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java
 726ce08 
  
engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
 102c471 
  
engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java
 c49a521 
  
engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockStorageMotionStrategy.java
 b619ee9 
  
engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
 3602bb1 
  
engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionService.java 
db36f64 
  
engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionServiceImpl.java
 343140f 
  
engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionStrategy.java 
ba40c6d 
  
engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
 ceadb25 
  
engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
 32e7d27 
  
plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl/RandomAllocator.java
 a672efd 
  
plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
 d2f3f69 
  
plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java
 d64e173 
  
plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer610Resource.java
 8d267b1 
  server/src/com/cloud/agent/manager/allocator/HostAllocator.java 60027e7 
  server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java 
0091e43 
  server/src/com/cloud/agent/manager/allocator/impl/TestingAllocator.java 
90bd956 
  server/src/com/cloud/server/ManagementServerImpl.java 26bc18d 
  server/src/com/cloud/storage/VolumeManagerImpl.java ff0235f 
  server/src/com/cloud/vm/UserVmManagerImpl.java 24bce8b 
  server/src/com/cloud/vm/VirtualMachineManager.java 4a30d97 
  server/src/com/cloud/vm/VirtualMachineManagerImpl.java a6d0b1b 
  server/test/com/cloud/vm/MockUserVmManagerImpl.java dd8dd83 
  server/test/com/cloud/vm/MockVirtualMachineManagerImpl.java 4917e77 
  server/test/com/cloud/vm/VirtualMachineManagerImplTest.java 322f051 
  setup/db/db/schema-410to420.sql f1e24fa 
  test/integration/component/test_storage_motion.py PRE-CREATION 
  tools/marvin/marvin/integration/lib/base.py 3751d98 

Diff: https://reviews.apache.org/r/10196/diff/


Testing
-------

1. Unit tests for testing vm migration with volume. They test when a vm is 
migrated within a cluster or across cluster. Also added negative tests for the 
scenrios.
2. Marvin tests to do functional testing. Including tests to varify vm 
migration with volume across cluster.
3. Marvin test for volume migration to another storage pool in the cluster 
while the vm continues to run on the same host.
4. Also did additional manual testing for the following scenarios:
4.1 VM migration with volumes within and across cluster.
4.2 Tested both the scenarios when 'migrateto' optional parameter is passed to 
the migrate vm with volume api. When it isn't passed, cloudstack picks up a 
storage pool for migration. When it is passed, the volume is migrated to the 
pool passed in the parameter.
4.3 Tested that storage tags are honored when a vm is migrated with its volumes.
4.4 Tested volume migration when the vm stays on the same host.
4.5 For volume migration verified that storage tags are honored.

Other tests done to verify patch:
1. Verified that there are no rat failures.
2. Applied the patch to verify it applies cleanly.


Thanks,

Devdeep Singh

Reply via email to