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/07/08 13:39:42 UTC

git commit: updated refs/heads/4.2 to 916a009

Updated Branches:
  refs/heads/4.2 2aacc29b4 -> 916a009d5


CLOUDSTACK-3393: Local disk recreated for stopped VM when started
Recreating local disk will result in cleanup of the old disk and this will lead to data loss. So preventing this and bailing out with error. Once migration of local disk is supported then another option is to migrate the existing disk to the new local storage pool.


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

Branch: refs/heads/4.2
Commit: 916a009d5d300d5621970a2ca29bd23e5d29fec3
Parents: 2aacc29
Author: Koushik Das <ko...@citrix.com>
Authored: Mon Jul 8 16:41:09 2013 +0530
Committer: Koushik Das <ko...@citrix.com>
Committed: Mon Jul 8 17:09:16 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/916a009d/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 d90e798..5799857 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -2391,15 +2391,15 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
                             DiskOfferingVO diskOffering = _diskOfferingDao
                                     .findById(vol.getDiskOfferingId());
                             if (diskOffering.getUseLocalStorage()) {
+                                // Currently migration of local volume is not supported so bail out
                                 if (s_logger.isDebugEnabled()) {
                                     s_logger.debug("Local volume "
                                             + vol
-                                            + " will be recreated on storage pool "
+                                            + " cannot be recreated on storagepool "
                                             + assignedPool
                                             + " assigned by deploymentPlanner");
                                 }
-                                VolumeTask task = new VolumeTask(VolumeTaskType.RECREATE, vol, null);
-                                tasks.add(task);
+                                throw new CloudRuntimeException("Local volume " + vol + " cannot be recreated on storagepool " + assignedPool + " assigned by deploymentPlanner");
                             } else {
                                 if (s_logger.isDebugEnabled()) {
                                     s_logger.debug("Shared volume "