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.
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.
(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?
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.
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.