cloudstack/vmware-base/test/com/cloud/hypervisor/vmware/mo
SudharmaJain 3f69c83f96 CLOUDSTACK-9956: File search on the vmware datastore may select wrong file if there are multiple files with same name (#2153)
If there are multiple files with the same name on vmware datastore, search operation may select any one file during volume related operations. This involves volume attach/detach, volume download, volume snapshot etc.

While using NetApp as the backup solution. This has .snapshot folder on the datastore and sometimes files from this folder gets selected during volume operations and the operation fails. Because of wrong selection of file following exception can be observed while volume deletion.

2017-02-23 19:39:05,750 ERROR [c.c.s.r.VmwareStorageProcessor] (DirectAgent-304:ctx-a1dbf5d8 ac.local) delete volume failed due to Exception: java.lang.RuntimeException
Message: Cannot delete file [4cbcd46d44c53f5c8244c0aad26a97e1] .snapshot/hourly.2017-02-23_1605/r-97-VM/ROOT-97.vmdk

To fix this behavior I have added a global configuration by name vmware.search.exclude.folders which can be comma separated list of folder paths.

I have also added a unit test to test the new method.
2017-09-19 15:12:17 +05:30
..
DatastoreMOTest.java CLOUDSTACK-9956: File search on the vmware datastore may select wrong file if there are multiple files with same name (#2153) 2017-09-19 15:12:17 +05:30
HypervisorHostHelperTest.java CLOUDSTACK-9591: Fix guest VM ovf xml to remove network nodes 2017-03-30 18:01:46 +05:30
TestVmwareContextFactory.java Reformatted all of the code. 2013-11-21 06:15:26 -08:00
VirtualMachineMOTest.java CLOUDSTACK-9963 Root Disk controller value is changing while migrating VM 2017-09-11 16:19:10 +05:30
VmwareMOTest.java Reformatted all of the code. 2013-11-21 06:15:26 -08:00