You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/07/09 22:46:08 UTC

[26/50] [abbrv] git commit: updated refs/heads/ui-ucs to 9334dab

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

Branch: refs/heads/ui-ucs
Commit: 33ed0769691691978999f618cca6a628977db029
Parents: 03c8f74
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:02:35 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/33ed0769/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 d63e631..4b76dff 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -2388,15 +2388,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 "