Bug 1399026

Summary: [RFE] Database Size Management for Red Hat Enterprise Linux OpenStack Platform
Product: Red Hat OpenStack Reporter: Nilesh <nchandek>
Component: rhosp-directorAssignee: Angus Thomas <athomas>
Status: CLOSED WORKSFORME QA Contact: Omri Hochman <ohochman>
Severity: high Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: aschultz, dbecker, jcoufal, jraju, mburns, mlinden, morazi, nchandek, pgrist, rhel-osp-director-maint
Target Milestone: ---Keywords: Tracking, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-17 22:28:58 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:
Bug Depends On: 1427765, 1427766    
Bug Blocks:    

Description Nilesh 2016-11-28 05:33:27 UTC
Description of problem:

In order to automate this command, it should run within the scope of a cron job on at least an hourly basis. And this should automatically build during Director installation.

Red Hat Enterprise Linux OpenStack Platform uses a MariaDB database in the OpenStack control plane for data persistence. This database acts as a system backend, storing configuration and historical data for certain OpenStack services, including Compute, Identity Service, and Block Storage.


Version-Release number of selected component (if applicable):

OSP 7
OSP 8
OSP 9 


++++++++++++++++++++++++++++
Identity Service (Keystone)
++++++++++++++++++++++++++++

~~~~~~~~~~
/usr/bin/keystone-manage token_flush

Example: 0 */1 * * * /usr/bin/keystone-manage token_flush >/dev/null 2>&1
~~~~~~~~~~

++++++++++++++++++++++++++++
Compute Service (Nova)
++++++++++++++++++++++++++++

~~~~~~~~~~
/usr/bin/nova-manage db archive_deleted_rows

Example: 0 */12 * * * /usr/bin/nova-manage db archive_deleted_rows >/dev/null 2>&1
~~~~~~~~~~

++++++++++++++++++++++++++++
Block Storage (Cinder)
++++++++++++++++++++++++++++

~~~~~~~~~~
/usr/bin/cinder-manage db purge 1 

Example: 0 */24 * * * /usr/bin/cinder-manage db purge 1 >/dev/null 2>&1
~~~~~~~~~~

++++++++++++++++++++++++++++
Image Service (Glance)
++++++++++++++++++++++++++++

~~~~~~~~~~
Glance also makes use of “soft-deleted” rows, however currently these can only be removed using manual SQL commands or custom scripting. 
~~~~~~~~~~


++++++++++++++++++++++++++++
Telemetry (Ceilometer)
++++++++++++++++++++++++++++

~~~~~~~~~~
The value can be set manually in /etc/ceilometer/ceilometer.conf
time_to_live = 2592000 

A cron job can run to remove the data .
0 0 * * * ceilometer-expirer --config-file /etc/ceilometer/ceilometer.conf

There is already a configurable in templates to perform the same. 
https://access.redhat.com/solutions/2219091
~~~~~~~~~~



Additional info:


Already there is a article to perform the same, but all sections need to be revised.

https://access.redhat.com/solutions/2219091

Comment 1 Nilesh 2016-12-01 05:12:23 UTC
Cu, is asking the progress of this bugzilla, Can we have update on this.

Comment 6 Nilesh 2017-02-09 07:50:53 UTC
There is already a KCS article for the same, but that needs be revised, and should be automatically get configured during OSP deployment, 

https://access.redhat.com/articles/1553233


There is no cron job configuration for Galnce and Network. This section should be revised. 


Glance - https://access.redhat.com/articles/1553233#Glance
Network - https://access.redhat.com/articles/1553233#Neutron

Comment 9 Alex Schultz 2017-02-10 16:10:33 UTC
Yea some items have already been included in newer versions.  I see that cinder, nova, heat and keystone all have their crons setup automatically.  It doesn't seem that we have anything for glance and network however.

Comment 12 Jaromir Coufal 2017-02-28 19:59:18 UTC
Nilesh, if we are asking only for Glance and Network, can you please create separate BZs for Storage and for Network teams? They will need to work on those independently. I will leave it up to you if you want to re-use this one for storage and create new one for network, or close this one and create two new BZs, but we will need them separate. Thanks, Jarda

PS: Tag them accordingly in Internal Whiteboard as DFG:Storage or DFG:Networking, so they get attention from the right teams.

Comment 13 Nilesh 2017-03-01 07:00:50 UTC
Hello, 

I am not specifically asking for Glance and Network, I am asking for all component and should be automatically get configured in the cron during director installation. 

I will open a separate bug for glance and network. for now my question can we apply this configuration during director installation via heat templates. So there will no manual configuration need to do .

Comment 14 Jaromir Coufal 2017-03-01 18:23:52 UTC
Correct, but if I understand correctly, the identified missing ones are those two, right?

Absolutely, make it part of the BZ request, that you want this to be enabled via director. Each team now owns A-Z solution (including deployment) and since director is our official deployment & management tool, it is more than reasonable to request enablement through it.

Comment 15 Nilesh 2017-03-02 05:38:54 UTC
Yes, correct. 

Two BZ's are - 

Glance 
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1427765

Network 
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1427766

Comment 18 Alex Schultz 2019-06-17 22:28:58 UTC
Closing out as the bugs that this depended on are closed. If future RFEs are requested around this topic, please file bugs separately for each affected service.