Merge "Fix generation of thousands of DHCP tap interfaces" into stable/pike

This commit is contained in:
Jenkins 2017-09-11 23:43:35 +00:00 committed by Gerrit Code Review
commit 671cbad9b9
2 changed files with 4 additions and 0 deletions

View File

@ -1432,6 +1432,8 @@ class DeviceManager(object):
LOG.exception('Unable to plug DHCP port for '
'network %s. Releasing port.',
network.id)
# We should unplug the interface in bridge side.
self.unplug(interface_name, network)
self.plugin.release_dhcp_port(network.id, port.device_id)
self.fill_dhcp_udp_checksums(namespace=network.namespace)

View File

@ -1571,6 +1571,8 @@ class TestDeviceManager(base.BaseTestCase):
dh.driver.plug.side_effect = OSError()
net = copy.deepcopy(fake_network)
self.assertRaises(OSError, dh.setup, net)
dh.driver.unplug.assert_called_once_with(mock.ANY,
namespace=net.namespace)
plugin.release_dhcp_port.assert_called_once_with(
net.id, mock.ANY)