Public bug reported:

Problem:
When we try to delete all locations for an ‘active’ image, the locations are 
not actually ‘deleted’ despite the image status being updated as ‘queued’.
Note: This behavior could be noticed only when we delete-all locations.

Scenario:
 - Have an active image with its associated locations.
 - Try updating the image to delete all locations with replace locations call 
and ensure the response status code is 200 and with image status as ‘queued’.
        eg., json: {‘op': 'replace', 'path': '/locations', 'value': []}; url: 
/v2/images/%(image_id); http method: patch
 - Make a call to get the image by ID. 
   Note: The obtained image details will still continue to have the list of 
locations.

Reason:
 - The update call to delete-all locations is ignored due to incorrect python 
‘falsy’ conditional check (at glance.sqlalchemy.api layer) that 
allows/disallows update of image locations.

Fix:
 - Make the conditional check explicit so that the delete-all locations call 
for the given image is allowed to update the image locations as 'deleted'.

** Affects: glance
     Importance: Undecided
         Status: New

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

Title:
  locations not ‘deleted’ on delete-all image.locations

Status in Glance:
  New

Bug description:
  Problem:
  When we try to delete all locations for an ‘active’ image, the locations are 
not actually ‘deleted’ despite the image status being updated as ‘queued’.
  Note: This behavior could be noticed only when we delete-all locations.

  Scenario:
   - Have an active image with its associated locations.
   - Try updating the image to delete all locations with replace locations call 
and ensure the response status code is 200 and with image status as ‘queued’.
        eg., json: {‘op': 'replace', 'path': '/locations', 'value': []}; url: 
/v2/images/%(image_id); http method: patch
   - Make a call to get the image by ID. 
     Note: The obtained image details will still continue to have the list of 
locations.

  Reason:
   - The update call to delete-all locations is ignored due to incorrect python 
‘falsy’ conditional check (at glance.sqlalchemy.api layer) that 
allows/disallows update of image locations.

  Fix:
   - Make the conditional check explicit so that the delete-all locations call 
for the given image is allowed to update the image locations as 'deleted'.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to