← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1436849] [NEW] Inconsistent delete API in case of soft-delete

 

Public bug reported:

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_instance_interval parameter in nova.conf and restart
nova-api and compute services.

2. Create an instance.
$ nova boot --flavor 42 --image 7c0b4737-f630-4adc-9907-4868d2571260 test

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-5229-4b55-ad49-4fc9a5d8367f
Response: Request to delete server dc4449fe-5229-4b55-ad49-4fc9a5d8367f has been accepted. (sends duplicate delete request)

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.

** Affects: nova
     Importance: Undecided
     Assignee: Ankit Agrawal (ankitagrawal)
         Status: New


** Tags: ntt

** Changed in: nova
     Assignee: (unassigned) => Ankit Agrawal (ankitagrawal)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1436849

Title:
  Inconsistent delete API in case of soft-delete

Status in OpenStack Compute (Nova):
  New

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_instance_interval parameter in nova.conf and restart
  nova-api and compute services.

  2. Create an instance.
  $ nova boot --flavor 42 --image 7c0b4737-f630-4adc-9907-4868d2571260 test

  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-5229-4b55-ad49-4fc9a5d8367f
  Response: Request to delete server dc4449fe-5229-4b55-ad49-4fc9a5d8367f has been accepted. (sends duplicate delete request)

  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1436849/+subscriptions


Follow ups

References