Inconsistent delete API in case of soft-delete
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Low
|
Unassigned |
Bug Description
When instance.vm_state is SOFT_DELETED, if we send duplicate delete request there is an inconsistency in delete api.
If delete api is called with instance name, it returns an error message while calling it with instance id returns success response and sends duplicate delete call to the server.
Steps to reproduce:
1. Set reclaim_
2. Create an instance.
$ nova boot --flavor 42 --image 7c0b4737-
3. Soft delete instance.
$ nova delete test
--Will soft delete the instance and update the vm_state to SOFT_DELETED
4. Call delete instance again with instance name.
$ nova delete test
Response: No server with a name or ID of 'test' exists.
ERROR (CommandError): Unable to delete the specified server(s).
5. Call delete instance using instance id.
$ nova delete dc4449fe-
Response: Request to delete server dc4449fe-
This is because when we call delete using instance id it fetch instance which is already in SOFT_DELETED state but in case of
using instance name it does not fetch instances which are already in SOFT_DELETED state.
Ideally it should return same response in both the cases (with instance name and id).
Note: Same issue is with force-delete call when instance is in SOFT_DELETED state.
Changed in nova: | |
assignee: | nobody → Ankit Agrawal (ankitagrawal) |
Changed in nova: | |
importance: | Undecided → Low |
Changed in nova: | |
status: | New → Confirmed |
tags: |
added: compute removed: ntt |
Changed in nova: | |
assignee: | Ankit Agrawal (ankitagrawal) → nobody |
status: | In Progress → Confirmed |
Changed in nova: | |
assignee: | nobody → Anusha Unnam (anusha-unnam) |
status: | Confirmed → In Progress |
Fix proposed to branch: master /review. openstack. org/171523
Review: https:/