mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
server: Check the max data volumes limit using the actual hypervisor version (#4122)
Fix to pick the max data volumes limit using the actual hypervisor version, instead of "default" version. Use the hypervisor version in the host table when product_version parameter in host details doesn't exist or is empty Fixes #4101
This commit is contained in:
parent
b4937725b0
commit
185d44a265
@ -3097,7 +3097,11 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
|
||||
Integer maxDataVolumesSupported = null;
|
||||
if (host != null) {
|
||||
_hostDao.loadDetails(host);
|
||||
maxDataVolumesSupported = _hypervisorCapabilitiesDao.getMaxDataVolumesLimit(host.getHypervisorType(), host.getDetail("product_version"));
|
||||
String hypervisorVersion = host.getDetail("product_version");
|
||||
if (org.apache.commons.lang.StringUtils.isBlank(hypervisorVersion)) {
|
||||
hypervisorVersion = host.getHypervisorVersion();
|
||||
}
|
||||
maxDataVolumesSupported = _hypervisorCapabilitiesDao.getMaxDataVolumesLimit(host.getHypervisorType(), hypervisorVersion);
|
||||
} else {
|
||||
HypervisorType hypervisorType = vm.getHypervisorType();
|
||||
if (hypervisorType != null && CollectionUtils.isNotEmpty(supportingDefaultHV) && supportingDefaultHV.contains(hypervisorType)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user