share does not have field 'has_snapshots'
Bug #1437009 reported by
Valeriy Ponomaryov
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: | added: api |
Changed in manila: | |
importance: | Undecided → Wishlist |
Changed in manila: | |
assignee: | nobody → NidhiMittalHada (nidhimittal19) |
Changed in manila: | |
status: | New → In Progress |
Changed in manila: | |
milestone: | none → mitaka-1 |
Changed in manila: | |
status: | In Progress → New |
Changed in manila: | |
milestone: | mitaka-1 → mitaka-2 |
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 |
Changed in manila: | |
status: | New → Triaged |
To post a comment you must log in.
I am working on it.
stack@controlle r:~/devstack$ manila show d5f35492- 0d5d-494f- b1f8-e5f512bf6f cc ------- ------+ ------- ------- ------- ------- ------- ------- ------- ------- ------- ------+ ------- ------+ ------- ------- ------- ------- ------- ------- ------- ------- ------- ------+ 67.225\ DemoVol1_ share_d5f35492_ 0d5d_494f_ b1f8_e5f512bf6f cc | generic1# GENERIC1 | 0d5d-494f- b1f8-e5f512bf6f cc | 09T14:51: 11.000000 | 0a906f4e9b0161c a6 | ------- ------+ ------- ------- ------- ------- ------- ------- ------- ------- ------- ------+ r:~/devstack$
+------
| Property | Value |
+------
| status | available |
| description | None |
| availability_zone | nova |
| share_network_id | None |
| export_locations | \\10.141.
| share_server_id | None |
| host | controller@
| snapshot_id | None |
| is_public | False |
| id | d5f35492-
| size | 1 |
| name | CIFS_share |
| share_type | Nexenta_Storage |
| created_at | 2015-09-
| share_proto | CIFS |
| project_id | 56ad9847e9ae485
| metadata | {} |
+------
stack@controlle
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.