'cinder delete' should have an option to specify ID or NAME unambiguous otherwise wrong volume might be deleted if its ID is same with some other volume's NAME. #3
Currently 'cinder' command does not have any option associated with 'delete'.
$ cinder help delete
usage: cinder delete <volume> [<volume> ...]
Removes one or more volumes.
Positional arguments:
<volume> Name or ID of volume or volumes to delete.
It takes arguments as volume ID or volume NAME. This is OK for most cases.
But what if there're 2 such volumes, say: volume A has ID '1234' and volume B has NAME '1234' and 'cinder delete 1234' will delete volume A even if the user intends to delete volume B. This is ambiguous and 'cinder delete' should give an warning at least. It's better for 'cinder delete' to accept an option to specify '--id' or '--name'.
Project:
Openstack
Project Area:
Openstack cinder
Release:
Openstack Liberty
Severity:
S1
Full Details:
Test Environment and PreCondtion:
Devstack deployed Openstack environment
Detailed Test Steps:
the first volume's ID is same as the third volume's name
[root@scaleiovm1 cinder]# cinder list
+--------------------------------------+-----------+--------------------------------------+------+-------------+----------+-------------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to |
+--------------------------------------+-----------+--------------------------------------+------+-------------+----------+-------------+-------------+
| 8c09d88f-8db2-4bc6-a8d8-a380264fd237 | available | 123 | 1 | scaleio | false | False | |
| c25e8627-e7fd-4293-b39f-e506ab6915e8 | available | dzhpeng2 | 1 | scaleio | false | False | |
| f906cad1-768e-4a1d-aa21-19c5c283661d | available | 8c09d88f-8db2-4bc6-a8d8-a380264fd237 | 1 | scaleio | false | False | |
+--------------------------------------+-----------+--------------------------------------+------+-------------+----------+-------------+-------------+
User wants to use 'cinder delete '
[root@scaleiovm1 cinder]# cinder delete dzhpeng2 8c09d88f-8db2-4bc6-a8d8-a380264fd237 ---> both are volume Name
Request to delete volume dzhpeng2 has been accepted.
Request to delete volume 8c09d88f-8db2-4bc6-a8d8-a380264fd237 has been accepted.
[root@scaleiovm1 cinder]# cinder list ---> the first volume and second volume deleted, here should warning or use --id --name way should be better
+--------------------------------------+-----------+--------------------------------------+------+-------------+----------+-------------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Multiattach | Attached to |
+--------------------------------------+-----------+--------------------------------------+------+-------------+----------+-------------+-------------+
| f906cad1-768e-4a1d-aa21-19c5c283661d | available | 8c09d88f-8db2-4bc6-a8d8-a380264fd237 | 1 | scaleio | false | False | |
+--------------------------------------+-----------+--------------------------------------+------+-------------+----------+-------------+-------------+
Description:
Currently 'cinder' command does not have any option associated with 'delete'.
It takes arguments as volume ID or volume NAME. This is OK for most cases. But what if there're 2 such volumes, say: volume A has ID '1234' and volume B has NAME '1234' and 'cinder delete 1234' will delete volume A even if the user intends to delete volume B. This is ambiguous and 'cinder delete' should give an warning at least. It's better for 'cinder delete' to accept an option to specify '--id' or '--name'.
Project:
Openstack
Project Area:
Openstack cinder
Release:
Openstack Liberty
Severity:
S1
Full Details:
Test Environment and PreCondtion:
Detailed Test Steps:
the first volume's ID is same as the third volume's name
User wants to use 'cinder delete'
Expected Results:
Actual results:
test step fail
Problem details:
Support Materials: