This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/master by this push:
     new 053b12c  CLOUDSTACK-9908: Primary Storage allocated capacity goes very 
high after VM snapshot (#2104)
053b12c is described below

commit 053b12c813f72f2bce3934f7ac757c752d5e2666
Author: jayakarteek <jayakarteek_vas...@accelerite.com>
AuthorDate: Fri Jan 5 11:19:01 2018 +0530

    CLOUDSTACK-9908: Primary Storage allocated capacity goes very high after VM 
snapshot (#2104)
    
    Added '-' chracter while reading Filenames so that filename match exactly 
with VM name.
---
 .../cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
index 00298ce..103765b 100644
--- 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
@@ -1306,11 +1306,12 @@ public class VmwareStorageManagerImpl implements 
VmwareStorageManager {
             // get volume's chain size for this VM snapshot; exclude current 
volume vdisk
             DataStoreTO store = volumeTO.getDataStore();
             ManagedObjectReference morDs = 
getDatastoreAsManagedObjectReference(baseName, hyperHost, store);
-            long size = getVMSnapshotChainSize(context, hyperHost, baseName + 
"*.vmdk", morDs, newPath);
+            long size = getVMSnapshotChainSize(context, hyperHost, baseName + 
".vmdk", morDs, newPath);
+            size = getVMSnapshotChainSize(context, hyperHost, baseName + 
"-*.vmdk", morDs, newPath);
 
             if (volumeTO.getVolumeType()== Volume.Type.ROOT) {
                 // add memory snapshot size
-                size += getVMSnapshotChainSize(context, hyperHost, vmName + 
"*.vmsn", morDs, null);
+                size += getVMSnapshotChainSize(context, hyperHost, vmName + 
"-*.vmsn", morDs, null);
             }
 
             volumeTO.setSize(size);

-- 
To stop receiving notification emails like this one, please contact
['"commits@cloudstack.apache.org" <commits@cloudstack.apache.org>'].

Reply via email to