Bug 1414549

Summary: Establish and set sensible defaults for ceilometer data retention period
Product: Red Hat OpenStack Reporter: Andreas Karis <akaris>
Component: openstack-tripleo-heat-templatesAssignee: Emilien Macchi <emacchi>
Status: CLOSED ERRATA QA Contact: Sasha Smolyak <ssmolyak>
Severity: medium Docs Contact:
Priority: high    
Version: 10.0 (Newton)CC: aschultz, augol, djuran, mburns, pkilambi, rhel-osp-director-maint, tvignaud
Target Milestone: z8Keywords: Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-5.3.8-8.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-17 15:40:53 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:

Description Andreas Karis 2017-01-18 20:10:09 UTC
Description of problem:
https://access.redhat.com/solutions/2215701

The current default value in Director based deployments for these values:
~~~
[database]
#(IntOpt) Number of seconds that alarm histories are kept in the database for (<= 0 means forever).
#alarm_history_time_to_live = -1
# (IntOpt) Number of seconds that events are kept in the database for (<= 0 means forever).
event_time_to_live = -1
# (IntOpt) Number of seconds that samples are kept in the database for (<= 0 means forever).
metering_time_to_live = -1
~~~

Databases regularly fill up root disks with these settings. We should set these to a reasonable value. Definitely not infinite retention.

Comment 3 David Juran 2017-10-02 16:43:28 UTC
In OSP10, with Aodh deployed by default, shouldn't the alarm_history_time_to_live parameter also be set in aodh.conf?

Comment 4 Sasha Smolyak 2017-11-13 14:36:46 UTC
1. 
[heat-admin@controller-0 ~]$ sudo docker exec -ti ceilometer_agent_central cat /etc/ceilometer/ceilometer.conf | grep time_to_live
# Deprecated group/name - [database]/time_to_live
#metering_time_to_live = -1
metering_time_to_live=-1
event_time_to_live=-1

Although in /usr/share/openstack-tripleo-heat-templates/puppet/services/ceilometer-collector.yaml all the changes are according to gerrit:

  CeilometerEventTTL:
    default: '86400'
    description: Number of seconds that events are kept in the database for
                 (<= 0 means forever)
    type: string
  CeilometerMeteringTTL:
    default: '86400'
    description: Number of seconds that samples are kept in the database for
                 (<= 0 means forever)
    type: string

2. 
[heat-admin@controller-0 ~]$ sudo docker exec -ti aodh_api cat /etc/aodh/aodh.conf | grep alarm_history_time_to_live
#alarm_history_time_to_live = -1

This default was never fixed

The defaults aren't changed
openstack-tripleo-heat-templates-7.0.3-0.20171024200823.el7ost.noarch

Comment 5 Pradeep Kilambi 2017-11-13 15:10:02 UTC
Your test is incorrect, you need collector deployed in order to set the ttl. As those are mongodb only settings really.

Comment 22 errata-xmlrpc 2018-05-17 15:40:53 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/RHSA-2018:1593