Fix for encryption and migration not working on Shared Mount Point#13537
Fix for encryption and migration not working on Shared Mount Point#13537abh1sar wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes regressions introduced when Shared Mount Point (SMP) storage pools began being identified as StoragePoolType.SharedMountPoint instead of being treated like Filesystem. It restores the qemu-img–managed disk creation/migration/encryption behavior for SMP by routing it through the same decision paths as NetworkFilesystem and Filesystem.
Changes:
- Introduces
QEMU_IMG_MANAGED_POOL_TYPES(NetworkFilesystem,Filesystem,SharedMountPoint) to centralize “qemu-img-managed” pool type decisions. - Ensures SMP uses the qemu-img-based paths for template-backing disk creation and physical disk creation (including preallocation options).
- Updates inline documentation to reflect SMP being part of the qemu-img-managed pool type group.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13537 +/- ##
============================================
- Coverage 17.67% 17.66% -0.02%
+ Complexity 15792 15789 -3
============================================
Files 5922 5923 +1
Lines 533165 533309 +144
Branches 65208 65238 +30
============================================
- Hits 94242 94204 -38
- Misses 428276 428460 +184
+ Partials 10647 10645 -2
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:
|
|
@blueorangutan package |
|
@shwstppr 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 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18456 |
|
code lgtm |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-16478)
|
|
@abh1sar , more testing needed for this? |
Description
LibvirtStorageAdapterused to identify the poolType for a Shared mount point storage asStoragePoolType.Filesystemas it derived it from LIbvirt's XML where both Local Storage and SMP map to thePoolType.Dir.So it used to have the same behaviour as Local Storage and NFS as there are some conditions that only check these two storages:
#12773 (4.22.1) changed this to set the poolType as
SharedMountPoint.It causes Shared Mount Point to be excluded from a few places in code.
This creates a few problems:
Encryption not being applied to the volumes .
Qcow2 being created with
compat=0.10or version2 instead of 3.This is because disk creation is now being done using
createPhysicalDiskByLibVirtinstead ofcreatePhysicalDiskByQemuImgMigrating a VM from NFS to SMP storage fails
This is because createDiskFromTemplateBacking returns now for SMP
Fix
Extract NetworkFilesystem/Filesystem/SharedMountPoint into a single QEMU_IMG_MANAGED_POOL_TYPES constant and route SharedMountPoint through the same qemu-img-based creation path as NFS/Filesystem everywhere that set is consulted.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested the 3 failing test cases with and without the fix.
How did you try to break this feature and the system with this change?