You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by li...@apache.org on 2015/04/27 13:13:38 UTC

git commit: updated refs/heads/master to f45e6b9

Repository: cloudstack
Updated Branches:
  refs/heads/master 429296e7b -> f45e6b94e


CLOUDSTACK-8405: Restore VM results in deletion of data disk.
Dont evict template when a delete command has been sent to VMware resource for deletion of volume.


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

Branch: refs/heads/master
Commit: f45e6b94edf3af1feaf4613daf292e5bb8ba7758
Parents: 429296e
Author: Likitha Shetty <li...@citrix.com>
Authored: Thu Mar 12 14:32:58 2015 +0530
Committer: Sanjay Tripathi <sa...@citrix.com>
Committed: Mon Apr 27 16:37:46 2015 +0530

----------------------------------------------------------------------
 .../cloud/hypervisor/vmware/resource/VmwareResource.java |  2 +-
 .../cloud/storage/resource/VmwareStorageProcessor.java   | 11 -----------
 2 files changed, 1 insertion(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f45e6b94/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index a628fb7..b30a572 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -5145,7 +5145,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
             ClusterMO clusterMo = new ClusterMO(context, morCluster);
 
             VirtualMachineMO vmMo = clusterMo.findVmOnHyperHost(vol.getPath());
-            if (vmMo != null) {
+            if (vmMo != null && vmMo.isTemplate()) {
                 if (s_logger.isInfoEnabled()) {
                     s_logger.info("Destroy template volume " + vol.getPath());
                 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f45e6b94/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
index ea91816..ab1a01d 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
@@ -1695,17 +1695,6 @@ public class VmwareStorageProcessor implements StorageProcessor {
                 if (s_logger.isInfoEnabled()) {
                     s_logger.info("Destroy root volume directly from datastore");
                 }
-            } else {
-                // evitTemplate will be converted into DestroyCommand, test if we are running in this case
-                VirtualMachineMO vmMo = clusterMo.findVmOnHyperHost(vol.getPath());
-                if (vmMo != null) {
-                    if (s_logger.isInfoEnabled()) {
-                        s_logger.info("Destroy template volume " + vol.getPath());
-                    }
-
-                    vmMo.destroy();
-                    return new Answer(cmd, true, "Success");
-                }
             }
 
             VmwareStorageLayoutHelper.deleteVolumeVmdkFiles(dsMo, vol.getPath(), new DatacenterMO(context, morDc));