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 28c770b commit 47346c2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/config/schema-transformer/config_db.py
Expand Up @@ -1809,8 +1809,11 @@ def locate_route_target(self):
for rt in vn.rt_list:
rtgt_obj = RouteTarget(rt)
self.obj.add_route_target(rtgt_obj, inst_tgt_data)
if (not compare_refs(self.obj.get_route_target_refs(),
old_rt_refs)):
if not self.is_default and vn.allow_transit:
rtgt_obj = RouteTarget(vn._route_target)
rinst_obj.add_route_target(rtgt_obj, inst_tgt_data)
if not compare_refs(self.obj.get_route_target_refs(),
old_rt_refs):
self._vnc_lib.routing_instance_update(self.obj)
except NoIdError as e:
self._logger.error(
Expand Down

0 comments on commit 47346c2

Please sign in to comment.