GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — kvm: resolve RBD disks of unmanaged instances without a mount lookup by weizhouapache · Pull Request #14693 · apache/cloudstack

Conversation

@weizhouapache

@weizhouapache weizhouapache commented Nov 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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

  • 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)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

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):

  1. Deployed a Tiny VM on an RBD pool.
  2. Unmanaged the VM.
  3. Ran listUnmanagedInstances on its KVM host. The RBD disk now reports datastore host = the Ceph monitor, datastore name and path = the RBD pool, type network, and image path <pool>/<image>.
  4. Imported the VM with importUnmanagedInstance. The import succeeded, the VM ran on RBD, and libvirt still pointed at the same image.
  5. Destroyed and expunged the imported VM.

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?

  • Gluster network disks keep the mount-based lookup (unit test).
  • File and block disks are not changed by this PR.
  • Not covered: a live run with a Gluster disk, and a before/after comparison of a file-based disk on the test environment.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@weizhouapache
kvm: resolve RBD disks of unmanaged instances without a mount lookup
1d34b1f
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.
@boring-cyborg boring-cyborg Bot added the component:kvm label Nov 12, 2026
@weizhouapache weizhouapache added component:ceph and removed component:kvm labels Nov 12, 2026
@boring-cyborg boring-cyborg Bot added the component:kvm label Nov 12, 2026
@weizhouapache
weizhouapache marked this pull request as ready for review November 12, 2026 12:51
@weizhouapache weizhouapache mentioned this pull request Nov 12, 2026
[WIP] Ceph improvements shapeblue/cloudstack#147
Draft
3 of 14 tasks
@codecov

codecov Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 4.08%. Comparing base (b56bbc2) to head (1d34b1f).

❗ There is a different number of reports uploaded between BASE (b56bbc2) and HEAD (1d34b1f). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (b56bbc2) HEAD (1d34b1f)
unittests 1 0
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     
Flag Coverage Δ
uitests 4.08% <ø> (ø)
unittests ?

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

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

component:ceph component:kvm

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@weizhouapache
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.