| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
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:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 20.00000% with 4 lines in your changes missing coverage. Please review.
@@ 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.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Code lgtm
Sorry, something went wrong.
|
@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. |
Sorry, something went wrong.
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18456 |
Sorry, something went wrong.
|
code lgtm |
Sorry, something went wrong.
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Sorry, something went wrong.
|
[SF] Trillian test result (tid-16478)
|
Sorry, something went wrong.
|
@abh1sar , more testing needed for this? |
Sorry, something went wrong.
No @DaanHoogland , I have tested all cases and change is straight forward. |
Sorry, something went wrong.
cool, thanks for the fix @abh1sar |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
LibvirtStorageAdapter used to identify the poolType for a Shared mount point storage as StoragePoolType.Filesystem as it derived it from LIbvirt's XML where both Local Storage and SMP map to the PoolType.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:
if (StoragePoolType.NetworkFilesystem.equals(poolType) || StoragePoolType.Filesystem.equals(poolType)) {#12773 (4.22.1) changed this to set the poolType as SharedMountPoint.
if (pool instanceof LibvirtStoragePool) { addPoolDetails(uuid, (LibvirtStoragePool) pool); + ((LibvirtStoragePool) pool).setType(type); }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.10 or version2 instead of 3.
This is because disk creation is now being done using createPhysicalDiskByLibVirt instead of createPhysicalDiskByQemuImg
Migrating a VM from NFS to SMP storage fails
This is because createDiskFromTemplateBacking returns now for SMP
public KVMPhysicalDisk createDiskFromTemplateBacking(KVMPhysicalDisk template, String name, PhysicalDiskFormat format, long size, KVMStoragePool destPool, int timeout, byte[] passphrase) { String volumeDesc = String.format("volume [%s], with template backing [%s], in pool [%s] (%s), with size [%s] and encryption is %s", name, template.getName(), destPool.getUuid(), destPool.getType(), size, passphrase != null && passphrase.length > 0); if (!poolTypesThatEnableCreateDiskFromTemplateBacking.contains(destPool.getType())) { logger.info(String.format("Skipping creation of %s due to pool type is none of the following types %s.", volumeDesc, poolTypesThatEnableCreateDiskFromTemplateBacking.stream() .map(type -> type.toString()).collect(Collectors.joining(", ")))); return null; }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?