glance/glance/db/registry
Long Quan Sha d6800e143d reuse the deleted image-member before create a new image-member
If glance backend database is not MySQL or postgreSQL,the unique
constraint of image-member only includes image-id and member.
If then an image-member is deleted, then create it again with the
same parameters, glance initiates a query to check if there is
already an existing one, but the result doesn't include the record
which was marked as deleted, glance will try to create a new one
with the same parameters, it will fail with SQL0803N error. To fix
this,we should check all existing image-member records including
the deleted image-member before create image-member, then update it
if it exists, otherwise create a new one.

APIImpact

Closes-Bug: #1462315
Implements: bp reuse-the-deleted-image-member

Change-Id: I84f88d133bf4ac6daa0ff5d148aed86c0ff2cb2d
2015-08-21 09:03:40 +08:00
..
__init__.py DB Driver for the Registry Service 2013-07-15 19:53:43 +02:00
api.py reuse the deleted image-member before create a new image-member 2015-08-21 09:03:40 +08:00