diff -Nru neutron-2014.1.5/debian/changelog neutron-2014.1.5/debian/changelog --- neutron-2014.1.5/debian/changelog 2016-11-03 20:53:31.000000000 +0000 +++ neutron-2014.1.5/debian/changelog 2016-11-25 07:59:33.000000000 +0000 @@ -1,3 +1,10 @@ +neutron (1:2014.1.5-0ubuntu8) trusty; urgency=medium + + * d/p/update_dhcp_host_portbinding_on_failover.patch: Update dhcp + host portbinding on failover.(LP: #1411163) + + -- Hui Xiang Fri, 25 Nov 2016 15:59:33 +0800 + neutron (1:2014.1.5-0ubuntu7) trusty; urgency=medium * agent/linux/ip_lib.py does not correctly handle output from 'iproute2' diff -Nru neutron-2014.1.5/debian/patches/series neutron-2014.1.5/debian/patches/series --- neutron-2014.1.5/debian/patches/series 2016-11-03 20:53:31.000000000 +0000 +++ neutron-2014.1.5/debian/patches/series 2016-11-25 07:59:33.000000000 +0000 @@ -9,3 +9,4 @@ refactor-log-in-loop.patch use-dictionary-for-iptables-find.patch neutron-ns-iface-enum.patch +update_dhcp_host_portbinding_on_failover.patch diff -Nru neutron-2014.1.5/debian/patches/update_dhcp_host_portbinding_on_failover.patch neutron-2014.1.5/debian/patches/update_dhcp_host_portbinding_on_failover.patch --- neutron-2014.1.5/debian/patches/update_dhcp_host_portbinding_on_failover.patch 1970-01-01 00:00:00.000000000 +0000 +++ neutron-2014.1.5/debian/patches/update_dhcp_host_portbinding_on_failover.patch 2016-11-25 07:59:33.000000000 +0000 @@ -0,0 +1,55 @@ +Description: Update dhcp host portbinding on failover + When a dhcp server is moved to new host on failover, tunnel is not created. + + When a dhcp server is moved to new host, + 1) network-hostagent binding is updated(properly i.e with new host). + 2) dhcp port-hostagent binding is not updated + ( dhcp port is still bound to old host) + If dhcp port-bound agent is different from the new dhcp agent + (which is now taking care of this dhcp port), neutron plugin won't + notify the l2pop, and hence tunnel is not created. + + As after failover, the new agent is taking care of this dhcp port, + update portbinding with the new host. This will allow neutron plugin + to notify l2pop(which will create tunnel). + + Change-Id: Ib7d7dcddee005395af116ccd31a43853332ae317 + +Author: venkata anil +Origin: backport +Bug: https://bugs.launchpad.net/neutron/+bug/1411163 + https://review.openstack.org/#/c/197937/ +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/neutron/db/dhcp_rpc_base.py ++++ b/neutron/db/dhcp_rpc_base.py +@@ -280,6 +280,7 @@ + 'from %(host)s.'), + {'port': port, + 'host': host}) ++ port['port'][portbindings.HOST_ID] = host + plugin = manager.NeutronManager.get_plugin() + return self._port_action(plugin, context, + {'id': port_id, 'port': port}, +--- a/neutron/tests/unit/test_db_rpc_base.py ++++ b/neutron/tests/unit/test_db_rpc_base.py +@@ -162,10 +162,18 @@ + return retval + + def test_update_dhcp_port(self): ++ port = {'port': {'network_id': 'foo_network_id', ++ 'device_owner': constants.DEVICE_OWNER_DHCP, ++ 'binding:host_id': 'foo_host', ++ 'fixed_ips': [{'subnet_id':'foo_subnet_id'}] ++ }, ++ 'id': 'foo_port_id' ++ } ++ + self.callbacks.update_dhcp_port(mock.Mock(), + host='foo_host', + port_id='foo_port_id', +- port=mock.Mock()) ++ port=port) + self.plugin.assert_has_calls( + mock.call.update_port(mock.ANY, 'foo_port_id', mock.ANY)) +