Bug 1249106

Summary: Requirement for Database Size Management
Product: Red Hat OpenStack Reporter: Alvaro Lopez Ortega <aortega>
Component: openstack-puppet-modulesAssignee: Martin Magr <mmagr>
Status: CLOSED ERRATA QA Contact: Leonid Natapov <lnatapov>
Severity: medium Docs Contact:
Priority: high    
Version: unspecifiedCC: aortega, dnavale, ggillies, mbayer, mmagr, mwagner, oblaut, yeylon
Target Milestone: z3Keywords: FutureFeature, Triaged, ZStream
Target Release: 7.0 (Kilo)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-puppet-modules-2015.1.8-24.el7ost Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1283388 (view as bug list) Environment:
Last Closed: 2015-12-21 17:09:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1265249    
Bug Blocks: 1249179, 1283388    

Description Alvaro Lopez Ortega 2015-07-31 13:44:12 UTC
Description of problem:

The DB associated with an OpenStack deployment (mariadb) acts as a system backend, storing configuration and historical data for certain OpenStack services, including Compute, Identity Service, and Block Storage.

It's important to put practices in place for maintaining the size of the database with regards to automatic purging of unneeded data.

Identity Service (Keystone) does it with a crontab entry like this:
0 */1 * * * /usr/bin/keystone-manage token_flush >/dev/null 2>&1

We ought to do something similar with the rest of the components:
0 */12 * * * /usr/bin/nova-manage db archive_deleted_rows >/dev/null 2>&1
0 */24 * * * /usr/bin/cinder-manage db purge 1 >/dev/null 2>&1

The related upstream bugs, reviews and blueprints follow:
https://bugs.launchpad.net/nova/+bug/1183523
https://review.openstack.org/#/c/200224/8
https://review.openstack.org/#/c/184645/
https://blueprints.launchpad.net/glance/+spec/database-purge

Comment 4 Martin Magr 2015-08-25 16:24:53 UTC
I went ahead and implemented db purge command for Glance myself. Hopefully this will pass upstream review quickly.

Comment 13 Ofer Blaut 2015-12-20 10:23:31 UTC
checked openstack-puppet-modules-2015.1.8-32.el7ost.noarch

OSPD 7.2

Comment 15 errata-xmlrpc 2015-12-21 17:09:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2015:2677