Bug 983124

Summary: [RFE] cinder: list the snapshots associated with the volume that cannot be deleted
Product: Red Hat OpenStack Reporter: Dafna Ron <dron>
Component: python-cinderclientAssignee: Eric Harney <eharney>
Status: CLOSED WONTFIX QA Contact: Dafna Ron <dron>
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: eharney, jruzicka, scohen, sgotliv, srevivo, yeylon
Target Milestone: ---Keywords: FutureFeature, Improvement
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: Doc Type: Enhancement
Doc Text:
Feature: list snapshots if volume delete from command-line fails due to snapshots existing Reason: Result (if any):
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-02 17:53:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dafna Ron 2013-07-10 14:45:29 UTC
Description of problem:

if we try to remove a volume with snapshot we get an error because it has snapshots. 
if we have the dependency please add a column in cinder list that will show that the volume has snapshots and when we try to remove the snapshot please list the  snapshots. 

Version-Release number of selected component (if applicable):

openstack-cinder-2013.1.2-3.el6ost.noarch

How reproducible:

100%

Steps to Reproduce:
1. create a volume 
2. create a snapshot for the volume
3. try to delete the volume (cinder delete <volume> )

Actual results:

we fail with the following error: 

ERROR: Invalid volume: Volume still has 2 dependent snapshots

Expected results:

if we cannot remove a volume with snapshots it would be nice if we can add a column that lets the user know if it has any snapshots when running 'cinder list'
also, when we try to delete and fail, it would be nice if we list the snapshots that the volume has. 

Additional info:


[root@opens-vdsb ~(keystone_admin)]# cinder list
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
|                  ID                  |   Status  | Display Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
| 7b7acdc1-c1fe-4654-93f9-7c3afc03b395 | available |     test     |  10  |     None    |  false   |             |
| fece4bd4-0a96-4bd3-8661-101dcbce8e28 | available |     bla      |  10  |     None    |  false   |             |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
[root@opens-vdsb ~(keystone_admin)]# cinder delete 7b7acdc1-c1fe-4654-93f9-7c3afc03b395
ERROR: Invalid volume: Volume still has 2 dependent snapshots

Comment 2 Dafna Ron 2014-02-04 11:09:29 UTC
bug opened upstream: https://bugs.launchpad.net/cinder/+bug/1276101

Comment 6 Eric Harney 2015-03-02 17:53:47 UTC
Nacked upstream.