share does not have field 'has_snapshots'

Bug #1437009 reported by Valeriy Ponomaryov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Won't Fix
Wishlist
NidhiMittalHada

Bug Description

Manila restricts to delete shares that has snapshots created from it. But to get know it one should either try delete share or list snapshots filtering by share ID he wants to delete. It is not proper approach for getting such info. Share itself should have attr (i.e. 'has_snapshots') that will provide such information.

Tags: api
tags: added: api
Changed in manila:
importance: Undecided → Wishlist
Changed in manila:
assignee: nobody → NidhiMittalHada (nidhimittal19)
Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

I am working on it.

stack@controller:~/devstack$ manila show d5f35492-0d5d-494f-b1f8-e5f512bf6fcc
+-------------------+---------------------------------------------------------------------+
| Property | Value |
+-------------------+---------------------------------------------------------------------+
| status | available |
| description | None |
| availability_zone | nova |
| share_network_id | None |
| export_locations | \\10.141.67.225\DemoVol1_share_d5f35492_0d5d_494f_b1f8_e5f512bf6fcc |
| share_server_id | None |
| host | controller@generic1#GENERIC1 |
| snapshot_id | None |
| is_public | False |
| id | d5f35492-0d5d-494f-b1f8-e5f512bf6fcc |
| size | 1 |
| name | CIFS_share |
| share_type | Nexenta_Storage |
| created_at | 2015-09-09T14:51:11.000000 |
| share_proto | CIFS |
| project_id | 56ad9847e9ae4850a906f4e9b0161ca6 |
| metadata | {} |
+-------------------+---------------------------------------------------------------------+
stack@controller:~/devstack$

There are two ways it can be fixed. Please suggest which one is acceptable..?

1)As has been suggested, the first approach can be to add one more field has_snapshot to share information.
where in has_snapshot will be true if there is >= 1 are associated snapshot for this share.
and has_snapshot will be false when 0 snapshots are associated with this share.

But this requires change in DB schema

2)2nd approach can be to add a cli command for share , that enquires whether share has a snapshot or not.
which will be somewhat like

manila share-snapshot-enquire <share-id>
result:- gives list of snapshots if associated with the share.

Changed in manila:
status: New → In Progress
Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

Do we plan to target this bug for next release ?

Changed in manila:
milestone: none → mitaka-1
Changed in manila:
status: In Progress → New
Changed in manila:
milestone: mitaka-1 → mitaka-2
Revision history for this message
NidhiMittalHada (nidhimittal19) wrote :

working on it ..

Changed in manila:
status: New → In Progress
Changed in manila:
milestone: mitaka-2 → mitaka-3
Changed in manila:
milestone: mitaka-3 → newton-1
Changed in manila:
assignee: NidhiMittalHada (nidhimittal19) → nobody
Changed in manila:
assignee: nobody → NidhiMittalHada (nidhimittal19)
Changed in manila:
status: In Progress → New
Revision history for this message
Jason Grosso (jgrosso) wrote :

Is this bug still in progress?

Jason Grosso (jgrosso)
Changed in manila:
status: New → Triaged
Revision history for this message
Jason Grosso (jgrosso) wrote :

closing item out if this is still a valid wish list item please feel free to reopen it

Changed in manila:
status: Triaged → Won't Fix
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.