engine/storage: Fix regression on create volume from snapshot (#5282)

* Fix regression on create volume from snapshot

* Log hidden exception

* Revert "Log hidden exception"

This reverts commit 70e655687faf9bafe47d44b3c9177742e5cb791f.

Co-authored-by: GutoVeronezi <daniel@scclouds.com.br>
This commit is contained in:
Daniel Augusto Veronezi Salvador 2021-08-09 05:07:10 -03:00 committed by GitHub
parent 43c8da2d0e
commit 1389862c22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,6 +185,11 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement
pools = reorderPoolsByCapacity(plan, pools);
}
if (vmProfile.getVirtualMachine() == null) {
s_logger.trace("The VM is null, skipping pools reordering by disk provisioning type.");
return pools;
}
if (vmProfile.getHypervisorType() == HypervisorType.VMware &&
!storageMgr.DiskProvisioningStrictness.valueIn(plan.getDataCenterId())) {
pools = reorderPoolsByDiskProvisioningType(pools, dskCh);