Bug 982693 - [RFE][cinder] allow to delete a volume with all it's snapshots
[RFE][cinder] allow to delete a volume with all it's snapshots
Status: CLOSED DUPLICATE of bug 1293185
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder (Show other bugs)
unspecified
x86_64 Linux
high Severity low
: ---
: 9.0 (Mitaka)
Assigned To: Eric Harney
lkuchlan
https://blueprints.launchpad.net/cind...
storage upstream_milestone_none upstr...
: FutureFeature, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-09 11:15 EDT by Dafna Ron
Modified: 2017-03-13 10:39 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
A new option, --cascade, has been added to the cinderclient command-line tool for the "delete" subcommand. As a result, users can now run "cinder delete --cascade VOLUME" to delete a volume and all its snapshots. This option is available in cinderclient version 1.7.0 or later.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-05 08:41:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
logs (17.59 KB, application/x-gzip)
2013-07-09 11:15 EDT, Dafna Ron
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 201748 None None None Never
OpenStack gerrit 264982 None None None 2016-03-24 10:27 EDT

  None (edit)
Description Dafna Ron 2013-07-09 11:15:20 EDT
Created attachment 771096 [details]
logs

Description of problem:

if we want to delete a volume that has snapshots we need to manually delete the snapshots before deleting the volumes. 
I think that the user should be given a choice if they want to either remove the volume with all its snapshots or not. 

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 from the volume
3. try to remove the volume

Actual results:

we will not be able to remove the volume and there is no force param to force remove volume + its snapshots

Expected results:

we should allow the user to remove the volume + its snapshots if they wish instead of having the user delete the snapshots manually. 

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   |             |
+--------------------------------------+-----------+--------------+------+-------------+----------+-------------+
[root@opens-vdsb ~(keystone_admin)]# cinder delete 7b7acdc1-c1fe-4654-93f9-7c3afc03b395
ERROR: Invalid volume: Volume still has 1 dependent snapshots
[root@opens-vdsb ~(keystone_admin)]# cinder help delete 
usage: cinder delete <volume>

Remove a volume.

Positional arguments:
  <volume>  ID of the volume to delete.
Comment 1 Eric Harney 2013-07-17 09:04:17 EDT
This should probably be done by having the client perform snapshot-delete and delete volume calls.
Comment 2 Eric Harney 2013-07-22 11:14:23 EDT
Moving back to openstack-cinder, as a different approach has been proposed upstream.
Comment 3 Ayal Baron 2013-12-18 02:55:06 EST
(In reply to Eric Harney from comment #2)
> Moving back to openstack-cinder, as a different approach has been proposed
> upstream.

Eric, any progress made upstream?
Comment 4 Eric Harney 2013-12-18 08:27:33 EST
(In reply to Ayal Baron from comment #3)
> Eric, any progress made upstream?

No, I don't think anyone is actively pursuing this at this time.
Comment 6 Yogev Rabl 2014-01-27 04:03:41 EST
Eric can you please check the test plan for this bug: https://tcms.engineering.redhat.com/plan/12155/openstackcinderrfesdelete-volume-with-snapshot#reviewcases 

and give some feedback.
Comment 7 RHEL Product and Program Management 2014-02-02 05:36:11 EST
Product Management has reviewed and declined this request.
You may appeal this decision by reopening this request.
Comment 8 Maor 2015-05-31 08:39:48 EDT
Is there any chance we can re-discuss this RFE?

removing a volume through an external application will make the process more complex if it will also have to remove all the redundant snapshots as well.
Comment 9 Yaniv Lavi 2015-06-02 09:15:56 EDT
Can you please add a reason for the nack here?
Comment 10 Sergey Gotliv 2015-06-04 03:22:45 EDT
I reopened that case for 8.0.
Comment 11 Sean Cohen 2015-08-24 00:23:26 EDT
Moving to POST as https://review.openstack.org/#/c/201748/ was merged upstream
Sean
Comment 12 Eric Harney 2015-08-24 09:50:28 EDT
(In reply to Sean Cohen from comment #11)

This still needs code written, moving out of POST for now.
Comment 13 Sergey Gotliv 2015-08-27 10:04:41 EDT
Moving to 9.0, it's not ready for 8.0.
Comment 14 Eric Harney 2016-03-09 19:59:52 EST
Mitaka now supports "cinder delete --cascade" which accomplishes this.
Comment 15 Yaniv Lavi 2016-03-23 05:01:48 EDT
I see the patch is merged, can we backport this to OSP 8?
Comment 16 Mike McCune 2016-03-28 18:33:16 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 17 Sean Cohen 2016-05-05 08:41:36 EDT

*** This bug has been marked as a duplicate of bug 1293185 ***

Note You need to log in before you can comment on or make changes to this bug.