-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Validate qcow2 file during import operation #11264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #11264 +/- ##
============================================
- Coverage 15.18% 15.17% -0.01%
+ Complexity 11367 11363 -4
============================================
Files 5415 5415
Lines 475910 476025 +115
Branches 58099 58114 +15
============================================
- Hits 72254 72246 -8
- Misses 395569 395696 +127
+ Partials 8087 8083 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds qcow2 file validation during import operations to enhance security and data integrity. The changes consolidate duplicate code for getting virtual size from disk files and introduce a new validation method for qcow2 files.
- Consolidates duplicate
getVirtualSizeFromFile
method implementations into a single utility method - Adds qcow2 file validation using
Qcow2Inspector.validateQcow2File
- Integrates qcow2 validation into copy and check volume operations
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
KVMPhysicalDisk.java | Adds centralized utility methods for getting virtual size and validating qcow2 files |
LibvirtResizeVolumeCommandWrapper.java | Removes duplicate getVirtualSizeFromFile method and uses centralized version |
LibvirtCopyRemoteVolumeCommandWrapper.java | Removes duplicate method, adds qcow2 validation, and uses centralized utilities |
LibvirtCheckVolumeCommandWrapper.java | Removes duplicate method, adds qcow2 validation, and uses centralized utilities |
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java
Outdated
Show resolved
Hide resolved
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java
Outdated
Show resolved
Hide resolved
@blueorangutan package |
@blueorangutan package |
@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. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14302 |
@blueorangutan test |
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm, good cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[SF] Trillian test result (tid-13848)
|
137f3be
to
541274e
Compare
…encrypted volume, and volume with backing file
541274e
to
210a3f2
Compare
@blueorangutan package |
@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. |
@kiranchavala updated, please check with latest packages |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14342 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
This PR validates qcow2 file during import operation (and has some code improvements).
Fixes #11260
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?