Repository navigation
kvm: resolve RBD disks of unmanaged instances without a mount lookup - #14693
weizhouapache wants to merge 1 commit into
Conversation
listUnmanagedInstances ran a substring mount lookup for every disk. For an RBD disk the pool name 'cloudstack' matched an unrelated NFS mount line, so the disk was reported on that NFS datastore and the import failed with 'Storage pool ... not found'. RBD disks now take the monitor host and the pool name from the libvirt source. Other disks, including Gluster network disks, keep the mount-based lookup. Add unit tests for the RBD and Gluster cases.
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14693 +/- ##
=============================================
- Coverage 18.32% 4.08% -14.24%
=============================================
Files 5939 449 -5490
Lines 537787 38282 -499505
Branches 65932 7083 -58849
=============================================
- Hits 98544 1564 -96980
+ Misses 428033 36503 -391530
+ Partials 11210 215 -10995
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 |
|
@weizhouapache 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 20127 |
|
this has been verified by @kiranchavala as part of shapeblue#147 |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-17615)
|
listUnmanagedInstances ran a substring mount lookup for every disk. For an RBD disk the pool name 'cloudstack' matched an unrelated NFS mount line, so the disk was reported on that NFS datastore and the import failed with 'Storage pool ... not found'.
RBD disks now take the monitor host and the pool name from the libvirt source. Other disks, including Gluster network disks, keep the mount-based lookup.
Add unit tests for the RBD and Gluster cases.
Description
This PR...
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Unit tests (
plugins/hypervisors/kvm):LibvirtGetUnmanagedInstancesCommandWrapperTest, 7 tests, all pass. The new cases check that an RBD disk takes the monitor host and pool name from the libvirt source without calling the mount lookup, and that a Gluster disk still uses the mount lookup.Live test on a Trillian test environment (Ubuntu 26.04, two KVM hosts, Ceph RBD pools, management server and KVM agents built from this change):
listUnmanagedInstanceson its KVM host. The RBD disk now reports datastore host = the Ceph monitor, datastore name and path = the RBD pool, typenetwork, and image path<pool>/<image>.importUnmanagedInstance. The import succeeded, the VM ran on RBD, and libvirt still pointed at the same image.Before this change the same disk was reported on the NFS mount that matched the pool name, and the import failed. The live run used an earlier build of the agent in which Gluster disks also took the RBD path. The RBD path is the same in both builds.
How did you try to break this feature and the system with this change?