Code review comment for lp:~jshepher/glance/lp813291

Revision history for this message
Justin Shepherd (jshepher) wrote :

There was already existing code meant to address this bug.. Where it would check for an already existing image id and update the existing image instead of responding with a error.

The issue is that it was a triple level method chain where image id gets lost in translation between method calls.

Image create gets the values as a dict, and then them on to _image_update (which expects image_id as its 3rd argument).. however image_create was not explicitly passing image_id.. so the existing logic was getting bypassed.

Now i am not sure this is the right code path.. i initially thought this should throw a 409 (http conflict).. and throw an error about a duplicate image id.

« Back to merge proposal