Improper provisioning of analytics_*_ttl values in contrail-analytics-api.conf

Bug #1503093 reported by Sundaresan Rajangam
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
High
Raj Reddy
R2.20.x
Won't Fix
High
Raj Reddy
R2.21.x
Fix Committed
High
Raj Reddy
Trunk
Fix Committed
High
Raj Reddy

Bug Description

1) By default, the following options in contrail-analytics-api.conf are set to None

analytics_data_ttl
analytics_config_audit_ttl
analytics_statistics_ttl
analytics_flow_ttl

This overrides the default values of analytics_*_ttl set and therefore the purge operation doesn't take the ttl values into consideration while calculating the purge_cutoff

2) Presently, the default values for analytics_*_ttl options are not same in contrail-analytics-api and contrail-collector

contrail-collector:
-------------------

analytics_data_ttl = 48
analytics_config_audit_ttl = 2160
analytics_statistics_ttl = 168
analytics_flow_ttl = 2

contrail-analytics-api:
-----------------------

analytics_data_ttl = 48,
analytics_config_audit_ttl = -1,
analytics_statistics_ttl = -1,
analytics_flow_ttl = -1,

If the user wants to change the analytics_*_ttl values, then he/she needs to duplicate the ttl values in contrail-collector.conf and contrail-analytics-api.conf and this is error prone.
Therefore, we should restrict the ttl configuration to contrail-collector.conf. contrail-collector should write the ttl values in cassandra and contrail-analytics-api or any other analytics process that needs to access the ttl values should read the same from cassandra.

no longer affects: juniperopenstack/r3.0
description: updated
description: updated
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/14574
Submitter: Raj Reddy (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/14614
Submitter: Raj Reddy (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/14574
Submitter: Raj Reddy (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/14574
Committed: http://github.org/Juniper/contrail-controller/commit/464270d12938c92255df7fadb2f95e212044c3c1
Submitter: Zuul
Branch: master

commit 464270d12938c92255df7fadb2f95e212044c3c1
Author: Raj Reddy <email address hidden>
Date: Tue Oct 20 18:10:21 2015 -0700

Commit includes the following changes
. add new fields in SYSTEM_OBJECT_TABLE to store _ttls by collector, they will
be retrieved by analytics-api and query-engine
. query-engine code changes to take care of time range calcuations using all
4 types of ttls based on the query
. TtlMap definition is moved from db_handler.h to viz.sandesh to be used in
collector, analytics-api and query-engine.
. cdb_if will not have any default ttl, it expects ttl to be given in column add

Change-Id: I96231f3fc0a6c9d0761851eb3b098ebee20c51a4
Closes-Bug: #1503093, #1503401

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/14614
Committed: http://github.org/Juniper/contrail-controller/commit/39bd619af87d73aa06710f0e16d5c4d010085842
Submitter: Zuul
Branch: R2.20

commit 39bd619af87d73aa06710f0e16d5c4d010085842
Author: Raj Reddy <email address hidden>
Date: Thu Oct 22 16:04:05 2015 -0700

Includes the following changes
. add new fields in SYSTEM_OBJECT_TABLE to store _ttls by collector, they will
be retrieved by analytics-api and query-engine
. query-engine code changes to take care of time range calcuations using all
4 types of ttls based on the query
. TtlMap definition is moved from db_handler.h to viz.sandesh to be used in
collector, analytics-api and query-engine.
. cdb_if will not have any default ttl, it expects ttl to be given in column add
Closes-Bug: #1503093, #1503401

Change-Id: I58247389714a4b3da2ea1abf4bf1c16e4516b8b2

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.21.x

Review in progress for https://review.opencontrail.org/14649
Submitter: Raj Reddy (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/14649
Committed: http://github.org/Juniper/contrail-controller/commit/30e48c9d2471ba812dbf1956dea9f1e1d197f86c
Submitter: Zuul
Branch: R2.21.x

commit 30e48c9d2471ba812dbf1956dea9f1e1d197f86c
Author: Raj Reddy <email address hidden>
Date: Thu Oct 22 16:04:05 2015 -0700

Includes the following changes
. add new fields in SYSTEM_OBJECT_TABLE to store _ttls by collector, they will
be retrieved by analytics-api and query-engine
. query-engine code changes to take care of time range calcuations using all
4 types of ttls based on the query
. TtlMap definition is moved from db_handler.h to viz.sandesh to be used in
collector, analytics-api and query-engine.
. cdb_if will not have any default ttl, it expects ttl to be given in column add
Closes-Bug: #1503093, #1503401

Change-Id: I58247389714a4b3da2ea1abf4bf1c16e4516b8b2
(cherry picked from commit 39bd619af87d73aa06710f0e16d5c4d010085842)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.