Merge "Fix generation of thousands of DHCP tap interfaces"
This commit is contained in:
commit
75d98fcd79
@ -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)
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user