xenapi: Do not retry snapshot upload on 500

If Glance returns a 500 response on an initial attempt to upload
a snapshot image, it will set the image status to killed.  Any retry
attempts will fail with a 409 response.

Hence, Nova should not attempt to retry the upload in this case, which
will eliminate many pointless retries.

Closes-Bug: 1349933

Change-Id: I1a8f2416923a368b02cf8963c747ebbb24d749a1
This commit is contained in:
Brian Elliott 2014-06-10 16:46:15 +00:00
parent 3f2202a234
commit 77aea0e6a3
1 changed files with 2 additions and 1 deletions

View File

@ -224,7 +224,8 @@ def _upload_tarball(staging_path, image_id, glance_host, glance_port,
httplib.REQUEST_ENTITY_TOO_LARGE,
httplib.PRECONDITION_FAILED,
httplib.CONFLICT,
httplib.FORBIDDEN):
httplib.FORBIDDEN,
httplib.INTERNAL_SERVER_ERROR):
# No point in retrying for these conditions
raise PluginError("Got Error response [%i] while uploading "
"image [%s] "