redis_uve_restart unit test is flakey

Bug #1554620 reported by Raj Reddy
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
Trunk
Fix Committed
High
Sundaresan Rajangam

Bug Description

test_03_redis_uve_restart fails too many times, should investigate..

Tags: analytics
Changed in juniperopenstack:
assignee: nobody → Sundaresan Rajangam (srajanga)
importance: Undecided → High
information type: Proprietary → Public
Revision history for this message
Sundaresan Rajangam (srajanga) wrote :

Upon redis-server restart, all the generators would resync their local UVE cache with the collector to update the UVE cache in redis.
collector notifies alarm-gen of any UVE updates through kafka. On receiving UVE notification, alarm-gen does UVE aggregation and compares the same against its own UVE cache. If there is no change in the UVE, it doesn't write the aggregated UVE in the redis.

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

Review in progress for https://review.opencontrail.org/18411
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/18412
Submitter: Sundaresan Rajangam (<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/18411
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/18412
Submitter: Sundaresan Rajangam (<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/18411
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/18412
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/18411
Committed: http://github.org/Juniper/contrail-controller/commit/23a1002c967483bfaf8485e5f9257c999a568cca
Submitter: Zuul
Branch: master

commit 23a1002c967483bfaf8485e5f9257c999a568cca
Author: Sundaresan Rajangam <email address hidden>
Date: Mon Mar 14 14:59:57 2016 -0700

Handle redis restart in alarm-gen

Presently, alarm-gen doesn't identify/handle redis-server restart case.
On redis-server restart, the aggregated UVEs are flushed.
alarm-gen doesn't identify the redis-server restart explicitly. It
handles the restart case, only if there is any exception on write due to
inconsistency in the local aggregated UVE cache and the redis aggregated
UVE db. Also, upon receiving UVE notification from kafka, alarm-gen does
UVE aggregation and compares it with its local aggregated UVE cache
before updating it in redis. Therefore, if there is no change in the
UVE after redis restart, it would not be updated in redis.

This patch adds support for handling redis-server restart in alarm-gen.
When alarm-gen connects to the local redis-server, it sets the key
"<alarm-gen-module-id>:<alarm-gen-instance-id>" to True.
In run_uve_processing(), on every iteration, if the redis instance
is not None, it checks if the above mentioned key exists to
identify the redis restart case and subsequently invoke
reconnect_agg_uve() to cleanup the local aggregated UVE cache and reset
the partition handlers.

Change-Id: Ib80d4662003a69d948d848f0334055bdbea435d0
Closes-Bug: #1554620

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

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

commit 08eab85676d5ad19bdf8d13045b52bb21b7150a6
Author: Sundaresan Rajangam <email address hidden>
Date: Mon Mar 14 14:59:57 2016 -0700

Handle redis restart in alarm-gen

Presently, alarm-gen doesn't identify/handle redis-server restart case.
On redis-server restart, the aggregated UVEs are flushed.
alarm-gen doesn't identify the redis-server restart explicitly. It
handles the restart case, only if there is any exception on write due to
inconsistency in the local aggregated UVE cache and the redis aggregated
UVE db. Also, upon receiving UVE notification from kafka, alarm-gen does
UVE aggregation and compares it with its local aggregated UVE cache
before updating it in redis. Therefore, if there is no change in the
UVE after redis restart, it would not be updated in redis.

This patch adds support for handling redis-server restart in alarm-gen.
When alarm-gen connects to the local redis-server, it sets the key
"<alarm-gen-module-id>:<alarm-gen-instance-id>" to True.
In run_uve_processing(), on every iteration, if the redis instance
is not None, it checks if the above mentioned key exists to
identify the redis restart case and subsequently invoke
reconnect_agg_uve() to cleanup the local aggregated UVE cache and reset
the partition handlers.

Change-Id: Ib80d4662003a69d948d848f0334055bdbea435d0
Closes-Bug: #1554620
(cherry picked from commit 23a1002c967483bfaf8485e5f9257c999a568cca)

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

Review in progress for https://review.opencontrail.org/18547
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/18548
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/18547
Committed: http://github.org/Juniper/contrail-packaging/commit/2994e36b1fc97d04394a2bef9c9f6adb92aa2347
Submitter: Zuul
Branch: master

commit 2994e36b1fc97d04394a2bef9c9f6adb92aa2347
Author: Sundaresan Rajangam <email address hidden>
Date: Fri Mar 18 16:47:18 2016 -0700

Add python-sseclient package to contrail_third_party_packages

Change-Id: I80f3aa9ab549c9570274a9fbebb2f12954565f24
Partial-Bug: #1554620

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

Reviewed: https://review.opencontrail.org/18548
Committed: http://github.org/Juniper/contrail-packaging/commit/3743574e82a48fcd9c47cb7ddf5f00dd644b9862
Submitter: Zuul
Branch: R3.0

commit 3743574e82a48fcd9c47cb7ddf5f00dd644b9862
Author: Sundaresan Rajangam <email address hidden>
Date: Fri Mar 18 16:47:18 2016 -0700

Add python-sseclient package to contrail_third_party_packages

Change-Id: I80f3aa9ab549c9570274a9fbebb2f12954565f24
Partial-Bug: #1554620
(cherry picked from commit 2994e36b1fc97d04394a2bef9c9f6adb92aa2347)

Revision history for this message
Sundaresan Rajangam (srajanga) wrote :
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.