Fix Xjob of router setup not triggered

1. What is the problem?
When booting instance and adding router interface are running at
the same time, sometimes asynchronous job of router setup is not
triggered so the bottom router is not created. A script that can
reproduce this problem is attached to the bug report page[1].

2. What is the solution to the problem?
As discussed in the bug report page[1], this is a time series
related bug. To fix this bug, we just need to modify the router
interface adding process to add top interface before getting
network resource routing entries.

3. What the features need to be implemented to the Tricircle
to realize the solution?
No new feature.

[1] https://bugs.launchpad.net/tricircle/+bug/1647924

Change-Id: Ia79e375ed95fc88f5f670e350fe5c7bbef5627f2
Closes-Bug: #1647924
This commit is contained in:
zhiyuan_cai 2017-01-19 14:43:26 +08:00
parent f3efadd111
commit 26d86dc701
1 changed files with 2 additions and 2 deletions

View File

@ -1387,8 +1387,6 @@ class TricirclePlugin(db_base_plugin_v2.NeutronDbPluginV2,
project_id = router['tenant_id']
add_by_port, _ = self._validate_interface_info(interface_info)
net_id, b_pods = self._get_net_pods_by_interface_info(
t_ctx, context, add_by_port, interface_info)
t_pod = db_api.get_top_pod(t_ctx)
assert t_pod
@ -1400,6 +1398,8 @@ class TricirclePlugin(db_base_plugin_v2.NeutronDbPluginV2,
return_info = super(TricirclePlugin, self).add_router_interface(
context, router_id, interface_info)
net_id, b_pods = self._get_net_pods_by_interface_info(
t_ctx, context, add_by_port, interface_info)
if not b_pods:
LOG.debug('Add router interface: no interfaces found, xjob not'
'triggered')