← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1732077] [NEW] Unreachable line need to be removed from stage() method of V2

 

Public bug reported:

In stage() method of v2 api, _restore() is called after the raising
Duplicate exception [1] which won't be reachable in any case after the
exception is raised.

_restore() changes the image_status from 'uploading' to 'queued'
and  data staging would start from the beginning after new stage call
with same image-id even though staging data has already been loaded
to store.
    
Hence it seems there is no point in keeping that _restore() incase of
Duplicate exception is raised.

[1]:
https://github.com/openstack/glance/blob/5d2ce20a9e31808d9e91dc5da4a124823f23ad09/glance/api/v2/image_data.py#L306

** Affects: glance
     Importance: Undecided
     Assignee: Pranali Deore (pranali-deore)
         Status: In Progress

** Changed in: glance
     Assignee: (unassigned) => Pranali Deore (pranali-deore)

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

Title:
  Unreachable line need to be removed from stage() method of V2

Status in Glance:
  In Progress

Bug description:
  In stage() method of v2 api, _restore() is called after the raising
  Duplicate exception [1] which won't be reachable in any case after the
  exception is raised.

  _restore() changes the image_status from 'uploading' to 'queued'
  and  data staging would start from the beginning after new stage call
  with same image-id even though staging data has already been loaded
  to store.
      
  Hence it seems there is no point in keeping that _restore() incase of
  Duplicate exception is raised.

  [1]:
  https://github.com/openstack/glance/blob/5d2ce20a9e31808d9e91dc5da4a124823f23ad09/glance/api/v2/image_data.py#L306

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


Follow ups