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
  • Loading branch information
Sachin Bansal committed Nov 20, 2015
1 parent f117eec commit f50ca65
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 @@ -514,6 +514,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._route_target)
rinst_obj.add_route_target(rtgt_obj, inst_tgt_data)
if (not compare_refs(rinst_obj.get_route_target_refs(),
old_rt_refs)):
need_update = True
Expand All @@ -529,6 +532,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._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 f50ca65

Please sign in to comment.