please add view for snapshot dependency to cinder list

Bug #1254711 reported by Dafna Ron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Opinion
Undecided
Unassigned

Bug Description

If we try to delete volumes and it has a snapshot we would fail on dependency.
I think being able to see in list which volume has a snapshot and than using show to see which snapshots are linked to it would be helpful.

[root@cougar06 ~(keystone_admin)]# cinder delete 128681f1-8af2-44fc-bcd6-e3075687f67a
ERROR: Invalid volume: Volume still has 1 dependent snapshots (HTTP 400) (Request-ID: req-a857bbcf-b754-4d85-8343-c3435ecaf1f3)
[root@cougar06 ~(keystone_admin)]#

[<email address hidden> ~(keystone_admin)]# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| ID | Status | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 128681f1-8af2-44fc-bcd6-e3075687f67a | available | vol1 | 12 | None | true | |
| 188d5e9f-7bb3-4e4a-95e9-6ba964f5a52a | available | new8 | 10 | None | false | |
| 292e6a93-922f-4370-806a-33fbf1ef48c7 | available | vol5 | 9 | None | false | |
| 49088941-73f8-48a4-a906-dc7bf024f0ea | available | new3 | 10 | None | true | |
| 4ee66206-1ce4-442c-8dfb-d7f2d50d32f1 | available | upload1 | 10 | None | false | |
| 684bdfe8-1f73-405b-ad71-d8c2b67af8de | available | upload | 10 | None | false | |
| 79f6dbb3-4897-427e-9ad6-7acc21e1d12b | available | baba1 | 10 | None | true | |
| 7e3df44e-14e1-4a92-b612-b0dd7731a4e2 | available | new4 | 10 | None | true | |
| 82045366-538e-41d5-8a7f-632e0c8e3550 | available | new2 | 10 | None | true | |
| 928dc8d9-9658-4df0-93a1-20a1bd245f4f | available | new7 | 10 | None | false | |
| a142d020-1fec-4b39-967c-c171696920a5 | available | vol7 | 10 | None | true | |
| b9e99855-dd4a-4268-a342-90312ff2adf8 | available | new5 | 10 | None | true | |
| bd2c6980-1f9b-4271-9675-0fcae037744f | available | new1 | 10 | None | true | |
| cc5405cb-5024-4215-ab2b-be80aa7f1ccf | available | baba2 | 10 | None | true | |
| df17e52b-c153-4d51-b4a0-9e53b8b02745 | available | baba | 10 | None | true | |
| e2fc5cc7-dca4-4470-a995-7ad92f85d283 | available | baba3 | 10 | None | true | |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+

[<email address hidden> ~(keystone_admin)]# cinder show 128681f1-8af2-44fc-bcd6-e3075687f67a
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | true |
| created_at | 2013-11-21T13:13:28.000000 |
| display_description | |
| display_name | vol1 |
| id | 128681f1-8af2-44fc-bcd6-e3075687f67a |
| metadata | {u'readonly': u'False'} |
| os-vol-host-attr:host | xxx.xxx.lab.tlv.redhat.com |
| os-vol-mig-status-attr:migstat | None |
| os-vol-mig-status-attr:name_id | None |
| os-vol-tenant-attr:tenant_id | 7eb59aa89e8944d098554ff6f5a4cf88 |
| size | 12 |
| snapshot_id | None |
| source_volid | None |
| status | available |
| volume_image_metadata | {u'container_format': u'bare', u'min_ram': u'0', u'disk_format': u'qcow2', u'image_name': u'rhel1', u'image_id': u'8ee09587-67bb-4e79-91fc-7c816f9957b3', u'checksum': u'e793566cf8aa170db033e37467334ecd', u'min_disk': u'0', u'size': u'699592704'} |
| volume_type | None |
+--------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
[<email address hidden> ~(keystone_admin)]# cinder help show
usage: cinder show <volume>

Show details about a volume.

Positional arguments:
  <volume> Name or ID of the volume.

Revision history for this message
Swapnil Kulkarni (coolsvap-deactivatedaccount) wrote :

I think the snapshot to volume association can be found by using snapshot-list | grep "volume-id" which I think makes sense rather than adding additional field in cinder-list.

e.g.

$ cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| 7aa56d35-e6a0-4a2f-9888-0a2903c69961 | available | None | 1 | None | false | |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+

$ cinder snapshot-list
+--------------------------------------+--------------------------------------+-----------+------+------+
| ID | Volume ID | Status | Name | Size |
+--------------------------------------+--------------------------------------+-----------+------+------+
| 16df4fd6-a94f-4fb5-80d0-863bde9d4445 | 7aa56d35-e6a0-4a2f-9888-0a2903c69961 | available | None | 1 |
| ade18398-3f59-4263-832b-4a8b68d1f54f | 7aa56d35-e6a0-4a2f-9888-0a2903c69961 | available | None | 1 |
+--------------------------------------+--------------------------------------+-----------+------+------+

$ cinder snapshot-list | grep "7aa56d35-e6a0-4a2f-9888-0a2903c69961"
| 16df4fd6-a94f-4fb5-80d0-863bde9d4445 | 7aa56d35-e6a0-4a2f-9888-0a2903c69961 | available | None | 1 |
| ade18398-3f59-4263-832b-4a8b68d1f54f | 7aa56d35-e6a0-4a2f-9888-0a2903c69961 | available | None | 1 |

Changed in python-cinderclient:
status: New → Opinion
Revision history for this message
Dafna Ron (dron-3) wrote :
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.