← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1372564] Re: Incorrect status change after image uploading in v2

 

** Changed in: glance
       Status: Invalid => In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1372564

Title:
  Incorrect status change after image uploading in v2

Status in Glance:
  In Progress
Status in Glance juno series:
  Fix Released
Status in Glance kilo series:
  Fix Released

Bug description:
  If the image is deleted (i.e. its status changed to 'deleted' in db) when it's uploading through image-upload command in v2, its status surprisingly switches from 'deleted' to 'active' without any exception.
  There is the code that should handle NotFound exception in that case
  https://github.com/openstack/glance/blob/master/glance/api/v2/image_data.py :77

  except exception.NotFound as e:
  msg = (_("Image %(id)s could not be found after upload."
  "The image may have been deleted during the upload: "
  "%(error)s Cleaning up the chunks uploaded") %
  {'id': image_id,
  'error': utils.exception_to_str(e)})

  but it never executes because the exception is not raised.
  In v1 this problem is solved with explicitly passing from_state argument, but in v2 it's not possible.

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


References