Fix hardcoded max data volumes when VM has been created but not started before#3494
Fix hardcoded max data volumes when VM has been created but not started before#3494yadvr merged 5 commits intoapache:masterfrom
Conversation
| HypervisorType.KVM, HypervisorType.Ovm, HypervisorType.LXC); | ||
| HypervisorType hypervisorType = vm.getHypervisorType(); | ||
| if (hypervisorType != null && supportingDefaultHV.contains(hypervisorType)) { | ||
| maxDataVolumesSupported = _hypervisorCapabilitiesDao.getMaxDataVolumesLimit(hypervisorType, "default"); |
There was a problem hiding this comment.
Could version specific values cause regression or bug?
There was a problem hiding this comment.
if these are lower the "default", yes @rhtyd. But that should never be the case, should it?
There was a problem hiding this comment.
Good point, I've verified any version contains max limit lower than the default for each hypervisor
| HypervisorType.KVM, HypervisorType.Ovm, HypervisorType.LXC); | ||
| HypervisorType hypervisorType = vm.getHypervisorType(); | ||
| if (hypervisorType != null && supportingDefaultHV.contains(hypervisorType)) { | ||
| maxDataVolumesSupported = _hypervisorCapabilitiesDao.getMaxDataVolumesLimit(hypervisorType, "default"); |
There was a problem hiding this comment.
if these are lower the "default", yes @rhtyd. But that should never be the case, should it?
|
hudson couldn't reach github :( |
|
try again |
07b38f0 to
435ad5f
Compare
435ad5f to
5fa201c
Compare
|
@blueorangutan package |
|
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✖centos7 ✖debian. JID-137 |
|
@blueorangutan package |
|
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-138 |
anuragaw
left a comment
There was a problem hiding this comment.
LGTM in general but a minor questions.
| } | ||
|
|
||
| @Override | ||
| public List<HypervisorType> getHypervisorsWithDefaultEntries() { |
There was a problem hiding this comment.
Is there a possibility of high frequency calls to this method? If so we can perhaps optimize query calls with some caching? If not LGTM
There was a problem hiding this comment.
Thanks @anuragaw, have refactored it to invoke this only once
|
@blueorangutan package |
|
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-139 |
|
@blueorangutan test matrix |
|
@nvazquez a Trillian-Jenkins matrix job (centos6 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
anuragaw
left a comment
There was a problem hiding this comment.
LGTM based on code and manual testing.
|
Trillian test result (tid-167)
|
|
Trillian test result (tid-168)
|
|
Tests LGTM, they are failing irrespective of this PR. |

Description
When VM is created but not started on any host, attaching a volume on it causes the maximum number of allowed volumes to be 6 (hardcoded)
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?