[Openstack-operators] Database cleanup policy

Abel Lopez alopgeek at gmail.com
Thu Oct 30 20:50:30 UTC 2014

Oh, I think you just gave me an idea for a new blueprint...
Honestly, It seems that this is something that should be part of ${service}-manage

On Oct 30, 2014, at 1:47 PM, Morgan Fainberg <morgan.fainberg at gmail.com> wrote:

> Hi Abel,
> For Keystone we already have a way to prune out expired records: keystone-manage token_flush
> This can be run via cron (recommended). The reason for the side band tool is that keystone does not have an internal scheduler for periodic tasks (not a common use keystone needs to do across all the functionality) 
> If you have a large number of tokens and use MYSQL, we have logic to help limit he impact to the backend by doing batched flushes.
> I am not sure what the requirements for holding on to data (e.g. Nova instances) once they've been deleted, but I think it is definitely worth setting some clear guidelines on this for each service so it can be followed / implemented as a built in function.
> Cheers,
> Morgan
> Sent via mobile
> On Oct 30, 2014, at 13:20, Abel Lopez <alopgeek at gmail.com> wrote:
>> We just had this question come up regarding the labs, but it applies to production as well.
>> I'm thinking that we need to implement some sort of periodic database pruning. Perhaps like every two months or so, go through all databases, all tables, and do like
>> delete from FOO where deleted=1 and deleted_at < date_sub(now(), interval 2 month)
>> Just as an example.
>> Does anyone have see any issues with purging deleted=1 data?
>> I've seen this be very helpful for things like Keystone tokens, etc.
>> _______________________________________________
>> OpenStack-operators mailing list
>> OpenStack-operators at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20141030/ae53821e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20141030/ae53821e/attachment.pgp>

More information about the OpenStack-operators mailing list