[VMware] Make disk controller selection on volume attachment consistent with VM creation and start#9636
Conversation
…reation and start
|
@blueorangutan package |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #9636 +/- ##
============================================
- Coverage 15.08% 15.08% -0.01%
- Complexity 11185 11188 +3
============================================
Files 5406 5406
Lines 473123 473229 +106
Branches 58163 60938 +2775
============================================
+ Hits 71371 71376 +5
- Misses 393810 393907 +97
- Partials 7942 7946 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10968 |
|
@blueorangutan test ol8 vmware-70u3 |
|
@rohityadavcloud a [SL] Trillian-Jenkins test job (ol8 mgmt + vmware-70u3) has been kicked to run smoke tests |
vmware-base/src/main/java/com/cloud/hypervisor/vmware/util/VmwareHelper.java
Outdated
Show resolved
Hide resolved
|
[SF] Trillian test result (tid-11353)
|
…areHelper.java Co-authored-by: dahn <daan.hoogland@gmail.com>
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11031 |
|
@blueorangutan test ol8 vmware-70u3 |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + vmware-70u3) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-11410)
|
|
@blueorangutan package |
|
@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11061 |
|
@blueorangutan test ol8 vmware-70u3 |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + vmware-70u3) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-11440)
|
|
@winterhazel maybe some test code could be added? integration or unit. @JoaoJandre at your descretion. |
Some unit testing would be nice. @winterhazel |
|
As I stated in the description, I am planning to add tests in another PR alongside an extension for the disk controllers that I'm working on, as it will require me to make changes to both this code and to the tests again. However, if you guys prefer it, I can try adding them here already next week. |
Sorry @winterhazel, I totally missed that part of the description. |
…nt with VM creation and start (apache#9636) * Make volume attachment disk controller selection consistent with VM creation and start * Update vmware-base/src/main/java/com/cloud/hypervisor/vmware/util/VmwareHelper.java Co-authored-by: dahn <daan.hoogland@gmail.com> * Choose disk controllers after converting osdefault * Rename function --------- Co-authored-by: dahn <daan.hoogland@gmail.com>
Description
When both
rootDiskControlleranddataDiskControllerdetails are set to SCSI controllers, the VM creation and start processes prioritize creating and using the controllers specified byrootDiskControllerfor all volumes. However, the volume attachment process does not consider this and always tries to attach volumes using the controllers specified for the data disks (even if a root disk is being attached).This way, in a scenario where
rootDiskControlleris set topvscsianddataDiskControlleris set tolsilogic(one example, as this problem also happens for other combinations) we ignore thedataDiskControllersetting defined by the operator and choose to use only PVSCSI controllers for both the root and data disks on VM creation/start. Then, when a user tries to attach a new data disk, we only considerdataDiskControllerand try to attach with LSI Logic instead. However, the process fails, as there are no LSI Logic controllers because we ignored the data disk controller chosen by the operator and opted to create PVSCSI controllers for both root and data disks when creating/starting the VM. Also, if we detach the root disk and try to attach it again, the process also fails because CloudStack tries to attach it using the controller specified for the data disks.To solve this issue, this PR makes the volume attachment disk controller selection logic consistent with VM creation/start. Tests will be added in another PR alongside an extension for the disk controllers that I'm currently working on, as it will require me to modify this code again.
Fixes #9400
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
For each of the following
rootDiskController/dataDiskControllercombinations:Below are my results.
[1] CloudStack tried to attach using an IDE controller. However, an exception happened because it ignored the CDRom when calculating the next available unit number, and tried to attach the disk on an unit number that was already being used. I will fix this issue separately in another PR.