contrail-logs doesn't output log messages for the complete query duration

Bug #1632446 reported by Sundaresan Rajangam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
High
Sundaresan Rajangam
R3.0.3.x
Fix Committed
High
Sundaresan Rajangam
R3.1
Fix Committed
High
Sundaresan Rajangam
Trunk
Fix Committed
High
Sundaresan Rajangam

Bug Description

If there are more log messages for the duration specified in the query, then contrail-logs doesn't dump all the log messages. Expiry time for each row in the query result is 5 minutes. analytics-api takes more time to read the query result from redis and hence some query results get expired before they are read by the anlaytics-api.

Tags: analytics
Revision history for this message
Sundaresan Rajangam (srajanga) wrote :

After further analysis, it is observed that contrail-logs takes more time to read/process the messages from analytics-api and hence back pressures analytics-api to read query result at slower pace.

Profiling stats for contrail-logs shows that lot of time is being spent on xmltodict.parse()

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

Review in progress for https://review.opencontrail.org/24907
Submitter: Sundaresan Rajangam (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/24912
Submitter: Sundaresan Rajangam (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/24914
Submitter: Sundaresan Rajangam (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/24919
Submitter: Sundaresan Rajangam (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/24912
Committed: http://github.org/Juniper/contrail-controller/commit/7b62c148a968971fd1256e59a0d10961498dc152
Submitter: Zuul
Branch: R3.1

commit 7b62c148a968971fd1256e59a0d10961498dc152
Author: Sundaresan Rajangam <email address hidden>
Date: Fri Oct 14 12:10:36 2016 -0700

Fetch all query rows before processing

contrail-logs takes lot of time processing the query result. Profiling
of the contrail-logs script showed that lot of time is being spent on
xmltodict.parse() and this impacts the overall time taken to fetch all
the rows from the anlaytics-api. TTL for the query result is set to 5 minutes
in redis. Therefore, if the number of records is more for the specified time
duration in the query, then it is possible that some rows may expire
before they are read and hence contrail-logs would display only partial
query result.
To avert this issue, contrail-logs should fetch the query result
completely before processing it.

Change-Id: Ic54731836675009895d69a26514d5699da96bf73
Closes-Bug: #1632446
(cherry picked from commit 71b508dab0ad2855dfb8327c67812b8e4a604e88)

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

Reviewed: https://review.opencontrail.org/24907
Committed: http://github.org/Juniper/contrail-controller/commit/71b508dab0ad2855dfb8327c67812b8e4a604e88
Submitter: Zuul
Branch: master

commit 71b508dab0ad2855dfb8327c67812b8e4a604e88
Author: Sundaresan Rajangam <email address hidden>
Date: Fri Oct 14 12:10:36 2016 -0700

Fetch all query rows before processing

contrail-logs takes lot of time processing the query result. Profiling
of the contrail-logs script showed that lot of time is being spent on
xmltodict.parse() and this impacts the overall time taken to fetch all
the rows from the anlaytics-api. TTL for the query result is set to 5 minutes
in redis. Therefore, if the number of records is more for the specified time
duration in the query, then it is possible that some rows may expire
before they are read and hence contrail-logs would display only partial
query result.
To avert this issue, contrail-logs should fetch the query result
completely before processing it.

Change-Id: Ic54731836675009895d69a26514d5699da96bf73
Closes-Bug: #1632446

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

Reviewed: https://review.opencontrail.org/24919
Committed: http://github.org/Juniper/contrail-controller/commit/6b76ab2e3c53f575e3e9a38fa9d52fbb5e713ebe
Submitter: Zuul
Branch: R3.0.3.x

commit 6b76ab2e3c53f575e3e9a38fa9d52fbb5e713ebe
Author: Sundaresan Rajangam <email address hidden>
Date: Fri Oct 14 12:10:36 2016 -0700

Fetch all query rows before processing

contrail-logs takes lot of time processing the query result. Profiling
of the contrail-logs script showed that lot of time is being spent on
xmltodict.parse() and this impacts the overall time taken to fetch all
the rows from the anlaytics-api. TTL for the query result is set to 5 minutes
in redis. Therefore, if the number of records is more for the specified time
duration in the query, then it is possible that some rows may expire
before they are read and hence contrail-logs would display only partial
query result.
To avert this issue, contrail-logs should fetch the query result
completely before processing it.

Change-Id: Ic54731836675009895d69a26514d5699da96bf73
Closes-Bug: #1632446
(cherry picked from commit 71b508dab0ad2855dfb8327c67812b8e4a604e88)

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

Reviewed: https://review.opencontrail.org/24914
Committed: http://github.org/Juniper/contrail-controller/commit/bdf11bcebe4aca4d0dc3367e64e18707f90f95f6
Submitter: Zuul
Branch: R3.0

commit bdf11bcebe4aca4d0dc3367e64e18707f90f95f6
Author: Sundaresan Rajangam <email address hidden>
Date: Fri Oct 14 12:10:36 2016 -0700

Fetch all query rows before processing

contrail-logs takes lot of time processing the query result. Profiling
of the contrail-logs script showed that lot of time is being spent on
xmltodict.parse() and this impacts the overall time taken to fetch all
the rows from the anlaytics-api. TTL for the query result is set to 5 minutes
in redis. Therefore, if the number of records is more for the specified time
duration in the query, then it is possible that some rows may expire
before they are read and hence contrail-logs would display only partial
query result.
To avert this issue, contrail-logs should fetch the query result
completely before processing it.

Change-Id: Ic54731836675009895d69a26514d5699da96bf73
Closes-Bug: #1632446
(cherry picked from commit 71b508dab0ad2855dfb8327c67812b8e4a604e88)

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

Other bug subscribers

Remote bug watches

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