Skip to content

storage: add dynamic managed storage dispatcher#442

Open
sp-viktori wants to merge 2 commits intooVirt:masterfrom
sp-viktori:managed-storage-dispatcher
Open

storage: add dynamic managed storage dispatcher#442
sp-viktori wants to merge 2 commits intooVirt:masterfrom
sp-viktori:managed-storage-dispatcher

Conversation

@sp-viktori
Copy link

Dispatch mechanism that third-party storage vendors can use to redirect managed storage operations.

  • Add an optional adapter field in the ManagedVolumeConnection struct.

  • If there is an adapter field, direct storage requests to managedvolume-helper-{adapter}, otherwise use the default (os-brick) implementation.

Works together with a simplar PR in ovirt-engine that allows redirection of the rest of the managed storage operations.

@sp-viktori sp-viktori force-pushed the managed-storage-dispatcher branch from 90d1601 to 394fa30 Compare October 16, 2025 15:08
@sp-viktori sp-viktori force-pushed the managed-storage-dispatcher branch 2 times, most recently from 5cc41fc to d0a34b5 Compare November 21, 2025 09:35
@sp-viktori sp-viktori force-pushed the managed-storage-dispatcher branch from d0a34b5 to b026231 Compare January 12, 2026 12:05
description: Adapter vendor
name: adapter
type: string
added: '4.5.6'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4.5.8 it would be if merged now

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for catching this, updated

the default `cinderlib-client.py` helper.

The vendor packaging is expected to install a symlink in
`/usr/share/ovirt-engine/cinderlib/` named `{adapter}-adapter`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in doubt if this is the right directory to put this in.
/usr/share/ovirt-engine/managedvolume/ perhaps and move cinderlib into it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I've changed this to reflect the oVirt Engine PR (the updated proposal indeed uses a managedblock directory instead of cinderlib).


try:
attachment = run_helper("attach", connection_info)
attachment = run_helper("attach", connection_info, connection_info.get("adapter"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is useless? As you pass connection_info, you can also get the adapter in the run_helper function then.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, yes, but the run_helper function has a union type: in this case it is connection_info but when calling for detach it is vol_info. Good news is that vol_info has connection_info as a field (which has adapter) but it becomes very convoluted to figure it out.

I'll think on simplifying the whole thing while keeping it robust, and push an update soon.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed a different approach, and also split it in two:

  1. A change in how managedvolume-helper is called that makes the protocol a bit stricter (so there is no ambiguity what is sent as input: it is always volume_info struct).
  2. The adapter dispatch which now knows exactly where to look for the adapter field.

@sp-viktori sp-viktori force-pushed the managed-storage-dispatcher branch from b026231 to 25159ca Compare February 4, 2026 12:31
Make the protocol used to communicate with the managed volume helper
scripts stricter.

Previously, the input could be:
- when attaching: connection_info struct;
- when detaching: volume_info struct which contains connection_info,
  attachment, path, etc.).

Now it is always a volume_info struct, and in the case when we're
attaching the struct only has the connection_info field populated.

Signed-off-by: Viktor Ivanov <[email protected]>
Add an optional "adapter" field in the ManagedVolumeConnection struct,
allowing dispatching to vendor managedvolume-helper adapters.

Signed-off-by: Viktor Ivanov <[email protected]>
@sp-viktori sp-viktori force-pushed the managed-storage-dispatcher branch from 25159ca to ce5b7f0 Compare February 4, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants