Skip to content

Support KVM storage implementations controlling logical/physical block io size#8724

Merged
yadvr merged 2 commits intoapache:mainfrom
mlsorensen:main-kvm-disk-blocksize
Mar 15, 2024
Merged

Support KVM storage implementations controlling logical/physical block io size#8724
yadvr merged 2 commits intoapache:mainfrom
mlsorensen:main-kvm-disk-blocksize

Conversation

@mlsorensen
Copy link
Copy Markdown
Contributor

@mlsorensen mlsorensen commented Feb 29, 2024

Description

This PR allows a given KVM storage implementation to decide if it wants to override the Libvirt disk XML's physical/logical IO size. For now all in-tree implementations will default to not using this.

In the future it may also be possible to extend the disk offerings to provide more granular control.

Note that using a logical sector size other than 512 would require the image to be built to support it, so this may be better suited as a property of the image at some point. Physical sector size can be changed as desired. This at least puts the XML definitions in place as a start.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Screenshots (if appropriate):

How Has This Been Tested?

Tested locally by modifying an in-tree plugin, but didn't commit that change to avoid changing upstream behavior.

Also added unit test to test XML generation.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 29, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 30.96%. Comparing base (6f27b1f) to head (229bb47).

Files Patch % Lines
...ervisor/kvm/resource/LibvirtComputingResource.java 0.00% 6 Missing ⚠️
...m/cloud/hypervisor/kvm/storage/KVMStoragePool.java 0.00% 2 Missing ⚠️
...ud/hypervisor/kvm/storage/KVMStorageProcessor.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8724      +/-   ##
============================================
- Coverage     30.97%   30.96%   -0.01%     
+ Complexity    33481    33478       -3     
============================================
  Files          5355     5355              
  Lines        375830   375855      +25     
  Branches      54895    54899       +4     
============================================
- Hits         116414   116400      -14     
- Misses       243974   244034      +60     
+ Partials      15442    15421      -21     
Flag Coverage Δ
simulator-marvin-tests 24.81% <0.00%> (-0.03%) ⬇️
uitests 4.36% <ø> (ø)
unit-tests 16.58% <60.00%> (+<0.01%) ⬆️

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

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

@sureshanaparti
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@sureshanaparti 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.

Copy link
Copy Markdown
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

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

code lgtm

@blueorangutan
Copy link
Copy Markdown

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

@sureshanaparti
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@sureshanaparti 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.

@blueorangutan
Copy link
Copy Markdown

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

@sureshanaparti
Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@sureshanaparti a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

[SF] Trillian test result (tid-9347)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 50548 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8724-t9347-kvm-centos7.zip
Smoke tests completed. 129 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@sureshanaparti
Copy link
Copy Markdown
Contributor

Hi @mlsorensen can this be targeted for 4.19.1?

Copy link
Copy Markdown
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

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

LGTM, based on code review and test results from marvin

@yadvr yadvr added this to the 4.20.0.0 milestone Mar 15, 2024
@yadvr yadvr merged commit 92bfb4d into apache:main Mar 15, 2024
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Mar 21, 2024
…k io size (apache#8724)

* Support KVM storage implementations controlling logical/physical block io size

* Support custom block size during disk attach

---------

Co-authored-by: Marcus Sorensen <mls@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants