From: mathieu-rohon Date: Thu, 20 Feb 2014 16:39:00 +0000 (+0100) Subject: l2-population/lb/vxlan : ip neigh add command failed X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=f0ec117c1ef33fb0f87861c9f66de337aed8ec50;p=openstack-build%2Fneutron-build.git l2-population/lb/vxlan : ip neigh add command failed we were using ip neigh add command which must be replaced by ip neigh replace, to avoid error when creating a VM with an ip previously used by a deleted VM Change-Id: I2405096d5925ae37efd5f8abcc02b99cf0c9f5d3 Closes-Bug: #1282662 --- diff --git a/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py b/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py index 7cb41400b..1eb2ced51 100755 --- a/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py +++ b/neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py @@ -566,7 +566,7 @@ class LinuxBridgeManager: return (agent_ip in entries and mac in entries) def add_fdb_ip_entry(self, mac, ip, interface): - utils.execute(['ip', 'neigh', 'add', ip, 'lladdr', mac, + utils.execute(['ip', 'neigh', 'replace', ip, 'lladdr', mac, 'dev', interface, 'nud', 'permanent'], root_helper=self.root_helper, check_exit_code=False) diff --git a/neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py b/neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py index ca979fc53..a1ce13a6e 100644 --- a/neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py +++ b/neutron/tests/unit/linuxbridge/test_lb_neutron_agent.py @@ -899,7 +899,7 @@ class TestLinuxBridgeRpcCallbacks(base.BaseTestCase): 'dev', 'vxlan-1', 'dst', 'agent_ip'], root_helper=self.root_helper, check_exit_code=False), - mock.call(['ip', 'neigh', 'add', 'port_ip', 'lladdr', + mock.call(['ip', 'neigh', 'replace', 'port_ip', 'lladdr', 'port_mac', 'dev', 'vxlan-1', 'nud', 'permanent'], root_helper=self.root_helper, check_exit_code=False), @@ -980,7 +980,7 @@ class TestLinuxBridgeRpcCallbacks(base.BaseTestCase): self.lb_rpc.fdb_update(None, fdb_entries) expected = [ - mock.call(['ip', 'neigh', 'add', 'port_ip_2', 'lladdr', + mock.call(['ip', 'neigh', 'replace', 'port_ip_2', 'lladdr', 'port_mac', 'dev', 'vxlan-1', 'nud', 'permanent'], root_helper=self.root_helper, check_exit_code=False),