You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2019/01/07 08:29:52 UTC

[cloudstack] branch 4.11 updated: vmware: syncVolumeToRootFolder method to avoid an infite recursive loop (#3105)

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

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


The following commit(s) were added to refs/heads/4.11 by this push:
     new e56c499  vmware: syncVolumeToRootFolder method to avoid an infite recursive loop (#3105)
e56c499 is described below

commit e56c499fb837363387184cdbc4a137945303a4ad
Author: Dingane Hlaluku <di...@shapeblue.com>
AuthorDate: Mon Jan 7 10:29:45 2019 +0200

    vmware: syncVolumeToRootFolder method to avoid an infite recursive loop (#3105)
    
    The static method syncVolumeToRootFolder() from VmwareStorageLayoutHelper.java:146 has been incorrectly called and leads to an infinite recursive call that ends up in a StackOverflowError. This PR fixes this.
    public static void syncVolumeToRootFolder(DatacenterMO dcMo, DatastoreMO ds, String vmdkName, String vmName) throws Exception { syncVolumeToRootFolder(dcMo, ds, vmdkName, null); } -> public static void syncVolumeToRootFolder(DatacenterMO dcMo, DatastoreMO ds, String vmdkName, String vmName) throws Exception { syncVolumeToRootFolder(dcMo, ds, vmdkName, vmName, null); }
---
 .../src/com/cloud/storage/resource/VmwareStorageLayoutHelper.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageLayoutHelper.java b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageLayoutHelper.java
index fc79a4b..9b2acbc 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageLayoutHelper.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageLayoutHelper.java
@@ -143,7 +143,7 @@ public class VmwareStorageLayoutHelper {
     }
 
     public static void syncVolumeToRootFolder(DatacenterMO dcMo, DatastoreMO ds, String vmdkName, String vmName) throws Exception {
-        syncVolumeToRootFolder(dcMo, ds, vmdkName, null);
+        syncVolumeToRootFolder(dcMo, ds, vmdkName, vmName, null);
     }
 
     public static void syncVolumeToRootFolder(DatacenterMO dcMo, DatastoreMO ds, String vmdkName, String vmName, String excludeFolders) throws Exception {