Skip to content

server: apply the restored volume max IOPS to the max IOPS field - #14024

Open
nagaboinaramgopal wants to merge 1 commit into
apache:4.20from
nagaboinaramgopal:fix/volume-restore-maxiops
Open

server: apply the restored volume max IOPS to the max IOPS field#14024
nagaboinaramgopal wants to merge 1 commit into
apache:4.20from
nagaboinaramgopal:fix/volume-restore-maxiops

Conversation

@nagaboinaramgopal

Copy link
Copy Markdown

Description

When a VM is restored, getRootVolumeSizeForVmRestore reads the requested min
and max IOPS from the volume details, but a copy-paste slip assigned the max
IOPS value into the min IOPS field:

if (StringUtils.isNumeric(maxIops)) {
    resizedVolume.setMinIops(Long.parseLong(maxIops));
}

So setMinIops was called twice and setMaxIops was never called. The result
is 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

  • Bug fix (non-breaking change which fixes an issue)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • Minor

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.

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

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.
@nagaboinaramgopal
nagaboinaramgopal force-pushed the fix/volume-restore-maxiops branch from 7545652 to baf1c85 Compare September 3, 2026 17:17
@nagaboinaramgopal
nagaboinaramgopal changed the base branch from main to 4.20 September 3, 2026 17:50
@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 19.78%. Comparing base (2cd8c5e) to head (baf1c85).

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     
Flag Coverage Δ
uitests 3.53% <ø> (-0.62%) ⬇️
unittests 21.05% <ø> (+3.84%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19091

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

4 participants