No error handling for adding same volume multiple times to the same group.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Confirmed
|
Low
|
Mutya Sai Phanindra |
Bug Description
Step 1 : add a existing to a group:
cinder --os-volume-
**** no output, however volume is successfully added to the group*******
Step 2 : Now, add two volumes to the same group, provided first volume is same as above and second is new.
cinder --os-volume-
***** No output, second volume is successfully added to the group ****** However, no error at user end that d5db026a-
ideally, it must generate an error for first volume along with successful message for addition of second volume.
summary: |
- No error for adding same volume multiple times to the same group. + No error handling for adding same volume multiple times to the same + group. |
Changed in python-cinderclient: | |
assignee: | nobody → Dinesh Bhor (dinesh-bhor) |
Changed in python-cinderclient: | |
status: | New → Confirmed |
Changed in python-cinderclient: | |
assignee: | Dinesh Bhor (dinesh-bhor) → Pooja Jadhav (poojajadhav) |
affects: | python-cinderclient → cinder |
Changed in cinder: | |
importance: | Undecided → Low |
tags: | added: groups |
Changed in cinder: | |
assignee: | nobody → Mutya Sai Phanindra (phani8179) |
Hi All,
I have come across a scenario where if user adds two volumes to volume group of which one is already added in the group then it adds 2nd volume to the group and returns 202 response to the user,
but when user tries to add two volumes to volume group which were already added then in that case it returns 400 Bad Request.
IMO to maintain the consistency in API behavior, it should return 400 HTTPBadRequest instead of 202 for the case where user tries to add two volumes out of which one is already added to volume group.
Please let me know your suggestion about the same.
Scenario 1:
If both volumes are already added to the group then it returns 400 Bad Request.
cinder --os-volume- api-version 3.13 group-update --add-volumes be543c8f- a779-4b4e- b1e1-9b611a410a 50,6ce9f6af- 2d0b-4d36- 8d7b-bdc542f0c1 64 df6b9470- 4cdd-422a- bea1-c5c80d84fb db
ERROR: Invalid Group: Cannot update group df6b9470- 4cdd-422a- bea1-c5c80d84fb db because no valid name, description, add_volumes, or remove_volumes were provided. (HTTP 400)
Scenario 2:
If first volume already added and the second one is new to be added to the group, cinder service ignores the first volume as it is already added and it adds the second volume to the group giving 202 response to the user. Is it an expected behavior?
cinder --os-volume- api-version 3.13 group-update --add-volumes be543c8f- a779-4b4e- b1e1-9b611a410a 50,6ce9f6af- 2d0b-4d36- 8d7b-bdc542f0c1 64 df6b9470- 4cdd-422a- bea1-c5c80d84fb db
202 Accepted
IMO with taking API consistency with the [1] scenario, it should return 400 HTTPBadRequest for the first volume as it is already added.