server: apply the restored volume max IOPS to the max IOPS field - #14024
Conversation
getRootVolumeSizeForVmRestore set the requested max IOPS onto the min IOPS field, overwriting the min value and never applying the max, so restoring a VM with an IOPS spec silently corrupted the volume QoS. Set the max IOPS on the max IOPS field.
7545652 to
baf1c85
Compare
|
@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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.20 #14024 +/- ##
============================================
+ Coverage 16.34% 19.78% +3.43%
- Complexity 13574 19990 +6416
============================================
Files 5669 6371 +702
Lines 501368 575899 +74531
Branches 60903 70495 +9592
============================================
+ Hits 81964 113925 +31961
- Misses 410219 449547 +39328
- Partials 9185 12427 +3242
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19091 |
|
@blueorangutan test |
|
@vishesh92 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
waiting for smoke tests. we can merge afterwards. |
|
[SF] Trillian test result (tid-16911)
|
|
Awesome work, congrats on your first merged pull request! |
Description
When a VM is restored,
getRootVolumeSizeForVmRestorereads the requested minand max IOPS from the volume details, but a copy-paste slip assigned the max
IOPS value into the min IOPS field:
So
setMinIopswas called twice andsetMaxIopswas never called. The resultis that restoring a VM silently drops the volume's max IOPS QoS setting and
overwrites min IOPS with the max value. Fixed by assigning the parsed max IOPS
to
setMaxIops.Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
Added a unit test that restores a volume with min IOPS 500 and max IOPS 2000
and asserts each field holds its own value. Also built the standard packages
and deployed on a KVM advanced zone.