Deleting volumes produce HTTP 202 error

Asked by terryg2012

In detaching many volumes that I had created, the nova-api log file shows the following error:

2013-04-01 18:30:38.151 INFO nova.osapi_compute.wsgi.server [req-edfa5757-df6f-40a0-a62a-2c8f1191ae2
d 651b1ea1ccc9440082c4284ec36759fb f688d8f77def45bab28eb06f402468af] 10.10.22.225 "DELETE /v2/f688d8
f77def45bab28eb06f402468af/servers/9e5986c9-9855-4e2f-9da5-5d6d85fd2da9/os-volume_attachments/7769a6
56-c640-44ab-8f08-f9399f34fadd HTTP/1.1" status: 202 len: 121 time: 1.0824511

I am using a python program to make direct API calls to the nova client to delete_server_volume. I believed the 202 error mean that the request has been submitted for processing. What is the best practice in handling this type of error to make sure the detach actually happen?

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Giampaolo Lauria
Solved:
Last query:
Last reply:
Revision history for this message
Best Giampaolo Lauria (lauria) said :
#1

Hi,

The API in this case is returning a 202 not to indicate an error, but working as designed.

202 is the response code to indicate that an asynchronous operation has ended successfully. This, for the most part, is the response code that is returned by the nova API when a client's request was accepted, but not yet processed.

As far as a built-in mechanism for checking that the operation completed (w/ or w/o errors), I believe that the API does not have an interface for checking the progress of asynchronous operations. This means you would have to poll yourself to get the status of the operation.

Revision history for this message
terryg2012 (terry-gong) said :
#2

Thanks Giampaolo Lauria, that solved my question.