You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ko...@apache.org on 2013/10/17 08:50:56 UTC

git commit: updated refs/heads/4.2 to 7e500a5

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 <ko...@apache.org>
Authored: Thu Oct 17 12:17:58 2013 +0530
Committer: Koushik Das <ko...@apache.org>
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");
         }