[RFE] Share capabilities are missing from share instance model

Bug #1660825 reported by Goutham Pacha Ravi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
In Progress
Low
Saravanan Manickam

Bug Description

Share has new keys for share capabilities that affect APIs: snapshot_support, create_share_from_snapshot_support, replication_type, mount_snapshot_support, revert_to_snapshot_support.

Only replication_type is present in the share instance object sent down to the driver, even if we assume that the share instance has all of the share data set in it.

More info on this bug (19/03/2020)
There are things we know that are in the share model that can help drivers when acting on any share but, we don't pass them down... drivers are already written in a way to call back into the database and retrieve the share type. So, if we make this change, in theory drivers can avoid that call - however, driver authors may still not have everything they need.
Adding this params would avoid an unnecessary round trip to the database from within a share driver.

Revision history for this message
Jason Grosso (jgrosso) wrote :

Hey Goutham any update on this one ?

Changed in manila:
status: New → Confirmed
importance: Undecided → Wishlist
description: updated
Revision history for this message
Vida Haririan (vhariria) wrote :
Vida Haririan (vhariria)
summary: - Share capabilities are missing from share instance model
+ [RFE] Share capabilities are missing from share instance model
Revision history for this message
Vida Haririan (vhariria) wrote :
tags: added: low-hanging-fruit
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

As the IRC discussion states, in all the driver calls in share/manager.py, the share manager passes the share (instance) model to the drivers - but, during provisioning (create, manage, create_from_snapshot, etc), drivers will need the extra-specs from the share type associated with the share instance to perform some actions.

So the solution to this RFE can be in several parts:

1) Grab the extra-specs from the share instance's share type and pass it down to the drivers in the share object as share['capabilities']. This method can be used to serialize the share instance: https://opendev.org/openstack/manila/src/commit/34d209484366cd921e052d37c5f9daef5e97af20/manila/share/manager.py#L4746-L4790 so that its not a sqlalchemy model object.

2) Drivers that currently query the share type extra specs for provisioning can stop doing so and rely on the share['capabilities']

Part (2) can be completed in separate follow up patches.

Since this is a good opportunity for new contributors to learn this part of the codebase, i'm tagging this as a "low-hanging-fruit".

Please feel free to claim this bug and work with any of the maintainers to fix it.

Changed in manila:
assignee: nobody → Lucas Morais de oliveira (lucasmoliveira059)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila/+/840187

Changed in manila:
status: Confirmed → In Progress
Vida Haririan (vhariria)
Changed in manila:
importance: Wishlist → Undecided
Changed in manila:
milestone: none → bobcat-3
importance: Undecided → Low
Changed in manila:
milestone: bobcat-3 → bobcat-rc1
Changed in manila:
milestone: bobcat-rc1 → caracal-1
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :
Changed in manila:
assignee: Lucas Morais de oliveira (lucasmoliveira059) → nobody
milestone: caracal-1 → caracal-2
assignee: nobody → Saravanan Manickam (msaravan)
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

@msaravan: Please feel free to assign this to someone else on your team...

Changed in manila:
milestone: caracal-2 → caracal-3
Changed in manila:
milestone: caracal-3 → dalmation-1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.