]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix hostname roaming for ml2 tunnel endpoints.
authorMiguel Angel Ajo <mangelajo@redhat.com>
Thu, 11 Jun 2015 11:15:17 +0000 (13:15 +0200)
committerMiguel Angel Ajo <mangelajo@redhat.com>
Mon, 21 Sep 2015 10:50:00 +0000 (12:50 +0200)
commit61d26b8b745ae431e21c22d1d82688708098171b
tree3c90040a9cfe931225cbbc3dfc9891c86602c3f6
parentfb51806d694ddba8a319c4f5aa90482f412778cf
Fix hostname roaming for ml2 tunnel endpoints.

Change I75c6581fcc9f47a68bde29cbefcaa1a2a082344e introduced
a bug where host name changes broke tunneling endpoint updates.
Tunneling endpoint updates roaming a hostname from IP to IP
are a common method for active/passive HA with pacemaker and
should happen automatically without the need for API/CLI calls [1].

delete_endpoint_by_host_or_ip is introduced to allow cleanup of
endpoints that potentially belonged to the newly registered agent,
while preventing the race condition found when deleting ip1 & ip2
in the next situation at step 4:

1) we have hostA: ip1
2) hostA goes offline
3) hostB goes online, with ip1, and registers
4) hostA goes online, with ip2, and registers

[1] https://bugs.launchpad.net/python-neutronclient/+bug/1381664

Change-Id: I04d08d5b82ce9911f3af555b5776fc9823e0e5b6
Closes-Bug: #1464178
neutron/plugins/ml2/drivers/type_tunnel.py
neutron/tests/unit/plugins/ml2/drivers/base_type_tunnel.py