[openstack-dev] [OpenStack] [Glance] Reuse the image id when recreate an image in Glance which had been deleted

Belmiro Moreira moreira.belmiro.email.lists at gmail.com
Tue May 21 20:08:11 UTC 2013


Hi,
in fact I believe having this information in glance DB is really useful.
In a big environment there are always instances running using images 
that were already deleted from glance.
Having the info that the image existed and it was deleted is important.

cheers,
Belmiro


On May 20, 2013, at 7:04 PM, Flavio Percoco <flavio at redhat.com> wrote:

> On 20/05/13 08:59 -0700, Clint Byrum wrote:
>> Excerpts from Flavio Percoco's message of 2013-05-20 00:25:28 -0700:
>>> On 17/05/13 11:33 -0700, Mark Washenberger wrote:
>>> >   I wonder if the best solution here is to change the uniqueness
>>> >   constraint in our tables (as has been mentioned in several other
>>> >   OpenStack-related database discussions) so that deleted images do not
>>> >   conflict with active images with the same uuid. As I recall, the best
>>> >   practice suggestion was to key the uniqueness constraint off the pair
>>> >   <uuid, deleted>. In this scheme, deleted is no longer a simple boolean,
>>> >   but rather either 0 (not deleted) or equal to the auto-increment row id
>>> >   (deleted).
>>> >   Does that make sense?
>>> 
>>> That should work.
>>> 
>>> I must admit, I'm a bit worried about keeping deleted images in the
>>> database, I see how that can be usefull (I guess) but I also think it
>>> just makes the database bigger and the table slower - thinking about
>>> really big environments and the fact that we're working on making
>>> glance public.
>>> 
>> 
>> This is why we have indexes. If there is a table scan, there is a
>> huge failure waiting to happen no matter how small the table is (see:
>> thundering herd). Well optimized access to tables shouldn't be any slower
>> if they have millions of small rows or just a few.
> 
> I know what indexes are for. FWIW, my concern was more about having
> data that is actually not being used. Having indexes and fast
> databases doesn't mean we should leave everything in it and just trust
> the index.
> 
> I think we should ask again whether does records are actually
> needed and if so, whether those records are actually needed in that
> table.
> 
> I'm still missing a bit of history about Glance so, hopefully, Mark /
> Brian can chime in and tell whether those records are really needed or
> not.
> 
> Cheers,
> FF
> 
> -- 
> { name: "Flavio Percoco",
>  gpg: "87112EC1",   internal: "8261386",
>  phone: "+390687502386",
>  irc: ["fpercoco", "flaper87"]}
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




More information about the OpenStack-dev mailing list