cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [14/50] [abbrv] git commit: updated refs/heads/master to 1c408de
Date Thu, 07 May 2015 14:04:52 GMT
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.

(cherry picked from commit f45e6b94edf3af1feaf4613daf292e5bb8ba7758)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


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

Branch: refs/heads/master
Commit: db379bf0e8040a20d4db2944963f4d441783efe2
Parents: 681d8c0
Author: Likitha Shetty <likitha.shetty@citrix.com>
Authored: Thu Mar 12 14:32:58 2015 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Apr 27 14:29:37 2015 +0200

----------------------------------------------------------------------
 .../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/db379bf0/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 ac93f9d..f992b70 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -5148,7 +5148,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/db379bf0/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 82cda82..60cd682 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java
@@ -1679,17 +1679,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));


Mime
View raw message