cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kous...@apache.org
Subject git commit: updated refs/heads/master to 9fc471d
Date Thu, 17 Oct 2013 10:27:06 GMT
Updated Branches:
  refs/heads/master e58bef22c -> 9fc471ddd


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/9fc471dd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9fc471dd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9fc471dd

Branch: refs/heads/master
Commit: 9fc471dddd48983919392f6a238b45fac824c50b
Parents: e58bef2
Author: Koushik Das <koushik@apache.org>
Authored: Thu Oct 17 15:56:33 2013 +0530
Committer: Koushik Das <koushik@apache.org>
Committed: Thu Oct 17 15:56:33 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeApiServiceImpl.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9fc471dd/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
index 2a058bf..00df333 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -1309,7 +1309,11 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
             throw new InvalidParameterValueException("Failed to find the destination storage
pool: " + storagePoolId);
         }
 
-        if (!_volumeMgr.volumeOnSharedStoragePool(vol)) {
+        if (_volumeMgr.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");
         }
 
@@ -1320,7 +1324,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
             try {
                 newVol = _volumeMgr.migrateVolume(vol, destPool);
             } catch (StorageUnavailableException e) {
-               s_logger.debug("Failed to migrate volume", e);
+                s_logger.debug("Failed to migrate volume", e);
             }
         }
         return newVol;


Mime
View raw message