Comment 16 for bug 1547178

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

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

commit c33f23845d7921c69e58ba4bea3d12ad95b71709
Author: Prakash Bailkeri <email address hidden>
Date: Wed Mar 2 16:07:35 2016 +0530

Static route task instance

Root cause:

StaticRoute task runs with instance ID of rtinstance->index() which allows
multiple static route tasks to run in parallel.

There are 3 major issues related to this concurrency
1. StaticRoute task adds/deletes/updates routes to DBtable. So concurrent tasks
could potentially operate on same DBTablePartition. Possibly corrupt the chagne_list

2. RemoveStaticRouteMgr called on BgpServer object corrupts the srt_manager_list_

3. Concurrent call to BgpConditionListener::UnregisterMatchCondition can corrupt
the condition listener datastructure.(TableMap map_).

Proposed Fix:

Run static route task with instance of 0.
Also, note that task policy of control-node ensures that
1. DBTable task and staticRoute task doesn't run in parallel.
2. bgp:Config task and StaticRoute tasks are mutually exclusive

Change-Id: Ib5ee4060ea90947a8261f33fa194219205702163
Closes-Bug: 1547178
(cherry picked from commit 2dc582a813a7f9ca0dbc3ee0940f449b3c0a9b1f)
(cherry picked from commit 06afb1b3bd4c5223cfa76d06eaf0b9900ef8eb8d)