]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Update DVR Binding when router_id changes
authorrossella <rsblendido@suse.com>
Wed, 27 Aug 2014 10:48:41 +0000 (10:48 +0000)
committerrossella <rsblendido@suse.com>
Sun, 17 Aug 2014 13:46:15 +0000 (13:46 +0000)
commit78059968e212d537c813f398da7f76714380bf4e
tree5c8ad95ec82161096883e85c82e55b23a28d51fd
parentf2c7ee79420fd60b6323b086e316e5747b9e9757
Update DVR Binding when router_id changes

In this patch I modified update_dvr_port_binding to update the
binding if router_id changes.
When a new router namespace is created on a host, sync_router
will call _ensure_host_set_on_port that will update the DVR binding.
With the current code update_dvr_port_binding won't update the
binding if there's an existing binding unless the binding
vif_type is VIF_TYPE_BINDING_FAILED . There's a race when
the router namespace is destroyed and then recreated on the same
host.
The DVR binding is deleted only when the message
update_device_down is processed. If this message is processed
after the update_dvr_port_binding triggered by the namespace creation,
update_dvr_port_binding won't update the binding. When the router
interface will be detected as UP, no DVR binding will be found.

Closes-bug: #1358554
Change-Id: I37fd4ed67dc2019b57e36d082b584c517d8f67a8
neutron/plugins/ml2/plugin.py
neutron/tests/unit/ml2/test_ml2_plugin.py