Routing instance may not get destroyed if it's importing static routes

Bug #1466755 reported by Nischal Sheth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.0
Fix Committed
High
Nischal Sheth
R2.1
Fix Committed
High
Nischal Sheth
R2.20
Fix Committed
High
Nischal Sheth
Trunk
Fix Committed
High
Nischal Sheth

Bug Description

A routing instance that's importing 1 or more static routes may not
get destroyed even if the configuration for the routing instance gets
deleted. This happens because the static route(s) that are imported
into the instance inet table as static routes do not get cleaned up on
instance deletion.

This will be seen only if routing instance configuration is deleted
and then added back quickly. As result of the quick delete and add,
the static route module may not see any changes in the route target
list of the static route if the new routing instance gets the same
route target(s) it had previously. Hence it doesn't try to update
the static routes.

When a table is deleted the RoutePathReplicator schedules walks of all
the tables that have any of the deleted table's import targets in their
export target list. This is normally sufficient to trigger removal of
the secondary routes that have been imported into table being deleted.

However, static routes are a slightly different case since they are added
with route targets to a table that itself doesn't have those targets in
it's export list. Hence the table walks scheduled above are not good
enough to trigger deletion of the secondary routes.

Problem has been recreated using a unit test. Need to figure out a fix.

Nischal Sheth (nsheth)
description: updated
Nischal Sheth (nsheth)
summary: - Routing instance does not get destroyed if it's importing a static route
+ Routing instance may not get destroyed if it's importing a static route
summary: - Routing instance may not get destroyed if it's importing a static route
+ Routing instance may not get destroyed if it's importing static routes
Nischal Sheth (nsheth)
description: updated
Nischal Sheth (nsheth)
description: updated
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/11881
Submitter: Nischal Sheth (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/11884
Submitter: Nischal Sheth (<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/11885
Submitter: Nischal Sheth (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/11887
Submitter: Nischal Sheth (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/11881
Submitter: Nischal Sheth (<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/11885
Submitter: Nischal Sheth (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/11884
Submitter: Nischal Sheth (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/11887
Submitter: Nischal Sheth (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/11885
Committed: http://github.org/Juniper/contrail-controller/commit/7be430d7743b4a5c83653d9ba5ea227ff89b90c4
Submitter: Zuul
Branch: master

commit 7be430d7743b4a5c83653d9ba5ea227ff89b90c4
Author: Nischal Sheth <email address hidden>
Date: Thu Jun 18 23:28:20 2015 -0700

Add logic to import/un-import static routes upon instance add/delete

The code in RoutePathReplicator::[Join|Leave] triggers import and
cleanup of routes by scheduling walks of tables that have the import
target being added/deleted in their export target list.

This is not effective for static routes since static routes live in
tables that do not have the route targets assocaited with the static
routes.

The ideal fix would be to maintain a dependency list of static routes
for each route target.

Implement a simpler fix for now, which is to trigger notification of
all static routes when an import target is added/deleted to a table.
This should have acceptable performance since the number of static
routes is usually relatively small.

Maintain a list of non-empty StaticRouteMgrs in the BgpServer so that
we don't have to iterate through all RoutingInstances in order to walk
all static routes.

Change-Id: I559e014fd1fd001c5209dce8ab3e7564048889c7
Closes-bug: 1466755

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

Reviewed: https://review.opencontrail.org/11881
Committed: http://github.org/Juniper/contrail-controller/commit/5a3f3137f4efbbeba91bc380baf0cc10ac12bb95
Submitter: Zuul
Branch: R2.20

commit 5a3f3137f4efbbeba91bc380baf0cc10ac12bb95
Author: Nischal Sheth <email address hidden>
Date: Thu Jun 18 23:28:20 2015 -0700

Add logic to import/un-import static routes upon instance add/delete

The code in RoutePathReplicator::[Join|Leave] triggers import and
cleanup of routes by scheduling walks of tables that have the import
target being added/deleted in their export target list.

This is not effective for static routes since static routes live in
tables that do not have the route targets assocaited with the static
routes.

The ideal fix would be to maintain a dependency list of static routes
for each route target.

Implement a simpler fix for now, which is to trigger notification of
all static routes when an import target is added/deleted to a table.
This should have acceptable performance since the number of static
routes is usually relatively small.

Maintain a list of non-empty StaticRouteMgrs in the BgpServer so that
we don't have to iterate through all RoutingInstances in order to walk
all static routes.

Change-Id: I559e014fd1fd001c5209dce8ab3e7564048889c7
Closes-bug: 1466755

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

Reviewed: https://review.opencontrail.org/11884
Committed: http://github.org/Juniper/contrail-controller/commit/78b330848ca26bc84a5c3dbe86cc34698d1d5b39
Submitter: Zuul
Branch: R2.1

commit 78b330848ca26bc84a5c3dbe86cc34698d1d5b39
Author: Nischal Sheth <email address hidden>
Date: Thu Jun 18 23:28:20 2015 -0700

Add logic to import/un-import static routes upon instance add/delete

The code in RoutePathReplicator::[Join|Leave] triggers import and
cleanup of routes by scheduling walks of tables that have the import
target being added/deleted in their export target list.

This is not effective for static routes since static routes live in
tables that do not have the route targets assocaited with the static
routes.

The ideal fix would be to maintain a dependency list of static routes
for each route target.

Implement a simpler fix for now, which is to trigger notification of
all static routes when an import target is added/deleted to a table.
This should have acceptable performance since the number of static
routes is usually relatively small.

Maintain a list of non-empty StaticRouteMgrs in the BgpServer so that
we don't have to iterate through all RoutingInstances in order to walk
all static routes.

Change-Id: I559e014fd1fd001c5209dce8ab3e7564048889c7
Closes-bug: 1466755

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

Reviewed: https://review.opencontrail.org/11887
Committed: http://github.org/Juniper/contrail-controller/commit/1a49af4bef9bc30f13ca4e7d7f0f909ed7b6f498
Submitter: Zuul
Branch: R2.0

commit 1a49af4bef9bc30f13ca4e7d7f0f909ed7b6f498
Author: Nischal Sheth <email address hidden>
Date: Thu Jun 18 23:28:20 2015 -0700

Add logic to import/un-import static routes upon instance add/delete

The code in RoutePathReplicator::[Join|Leave] triggers import and
cleanup of routes by scheduling walks of tables that have the import
target being added/deleted in their export target list.

This is not effective for static routes since static routes live in
tables that do not have the route targets assocaited with the static
routes.

The ideal fix would be to maintain a dependency list of static routes
for each route target.

Implement a simpler fix for now, which is to trigger notification of
all static routes when an import target is added/deleted to a table.
This should have acceptable performance since the number of static
routes is usually relatively small.

Maintain a list of non-empty StaticRouteMgrs in the BgpServer so that
we don't have to iterate through all RoutingInstances in order to walk
all static routes.

Change-Id: I559e014fd1fd001c5209dce8ab3e7564048889c7
Closes-bug: 1466755

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.