Skip to content

Commit

Permalink
Schema transformer should restore route target list at restart
Browse files Browse the repository at this point in the history
When schema transformer restarts, it resets route targets to what is currently
applicable. But it is not restoring the primary routing-instance's target as an
export target on service routing instances if needed. With this patch, that is
fixed.

Change-Id: Id829af2e3d16f98b52f2b21a8c9f2fdff21ecde5
Closes-Bug: 1518415
(cherry picked from commit f50ca65)
  • Loading branch information
Sachin Bansal committed Nov 23, 2015
1 parent 7fc00fa commit cfc28d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/config/schema-transformer/to_bgp.py
Expand Up @@ -636,6 +636,9 @@ def locate_routing_instance(self, rinst_name, service_chain=None,
for rt in self.rt_list:
rtgt_obj = RouteTarget(rt)
rinst_obj.add_route_target(rtgt_obj, inst_tgt_data)
if not is_default and self.allow_transit:
rtgt_obj = RouteTarget(self.get_route_target())
rinst_obj.add_route_target(rtgt_obj, inst_tgt_data)
_vnc_lib.routing_instance_update(rinst_obj)
except (NoIdError, KeyError):
rinst_obj = None
Expand All @@ -647,6 +650,9 @@ def locate_routing_instance(self, rinst_name, service_chain=None,
for rt in self.rt_list:
rtgt_obj = RouteTarget(rt)
rinst_obj.add_route_target(rtgt_obj, inst_tgt_data)
if not is_default and self.allow_transit:
rtgt_obj = RouteTarget(self.get_route_target())
rinst_obj.add_route_target(rtgt_obj, inst_tgt_data)
_vnc_lib.routing_instance_create(rinst_obj)
except (BadRequest, HttpError) as e:
_sandesh._logger.error(
Expand Down

0 comments on commit cfc28d0

Please sign in to comment.