Updated Branches:
  refs/heads/4.2 d17024c09 -> 7e500a5de

CLOUDSTACK-4551: Migrating the data volume from NFS to local storage 
,underlying disk offering is not changed.
Even though the volume may get migrated from shared to local storage, it is not 
possible to update the disk offering.
The fix is to disallow migration from shared to local store.


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

Branch: refs/heads/4.2
Commit: 7e500a5de87bc11db071d57c90180310a6cb240e
Parents: d17024c
Author: Koushik Das <[email protected]>
Authored: Thu Oct 17 12:17:58 2013 +0530
Committer: Koushik Das <[email protected]>
Committed: Thu Oct 17 12:17:58 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeManagerImpl.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e500a5d/server/src/com/cloud/storage/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java 
b/server/src/com/cloud/storage/VolumeManagerImpl.java
index b680da1..faa4ed3 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -2245,7 +2245,11 @@ public class VolumeManagerImpl extends ManagerBase 
implements VolumeManager {
                             + storagePoolId);
         }
 
-        if (!volumeOnSharedStoragePool(vol)) {
+        if (volumeOnSharedStoragePool(vol)) {
+            if (destPool.isLocal()) {
+                throw new InvalidParameterValueException("Migration of volume 
from shared to local storage pool is not supported");
+            }
+        } else {
             throw new InvalidParameterValueException(
                     "Migration of volume from local storage pool is not 
supported");
         }

Reply via email to