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)
Reviewed: https:/ /review. opencontrail. org/18241 github. org/Juniper/ contrail- controller/ commit/ c33f23845d7921c 69e58ba4bea3d12 ad95b71709
Committed: http://
Submitter: Zuul
Branch: R2.21.x
commit c33f23845d7921c 69e58ba4bea3d12 ad95b71709
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 updates routes to DBtable. So concurrent tasks
1. StaticRoute task adds/deletes/
could potentially operate on same DBTablePartition. Possibly corrupt the chagne_list
2. RemoveStaticRou teMgr called on BgpServer object corrupts the srt_manager_list_
3. Concurrent call to BgpConditionLis tener:: UnregisterMatch Condition can corrupt (TableMap map_).
the condition listener datastructure.
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: Ib5ee4060ea9094 7a8261f33fa1942 19205702163 a0dbc3ee0940f44 9b3c0a9b1f) 3cfa76d06eaf0b9 900ef8eb8d)
Closes-Bug: 1547178
(cherry picked from commit 2dc582a813a7f9c
(cherry picked from commit 06afb1b3bd4c522