You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2019/07/16 13:16:01 UTC

[GitHub] [cloudstack] nvazquez commented on a change in pull request #3494: Fix hardcoded max data volumes when VM has been created but not started before

nvazquez commented on a change in pull request #3494: Fix hardcoded max data volumes when VM has been created but not started before
URL: https://github.com/apache/cloudstack/pull/3494#discussion_r303901866
 
 

 ##########
 File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
 ##########
 @@ -3007,6 +3009,13 @@ private int getMaxDataVolumesSupported(UserVmVO vm) {
         if (host != null) {
             _hostDao.loadDetails(host);
             maxDataVolumesSupported = _hypervisorCapabilitiesDao.getMaxDataVolumesLimit(host.getHypervisorType(), host.getDetail("product_version"));
+        } else {
+            List<HypervisorType> supportingDefaultHV = Arrays.asList(HypervisorType.XenServer, HypervisorType.VMware,
+                    HypervisorType.KVM, HypervisorType.Ovm, HypervisorType.LXC);
+            HypervisorType hypervisorType = vm.getHypervisorType();
+            if (hypervisorType != null && supportingDefaultHV.contains(hypervisorType)) {
+                maxDataVolumesSupported = _hypervisorCapabilitiesDao.getMaxDataVolumesLimit(hypervisorType, "default");
 
 Review comment:
   Good point, I've verified any version contains max limit lower than the default for each hypervisor

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services