yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #38421
[Bug 1495161] [NEW] Cannot add tap interface to the bridge when bridge mappings is not provided
Public bug reported:
I am using linux bridge and I cannot add dhcp tap interface when the
bridge mappings is not provided.
Steps to reproduce:
1. Create a network
2. Create a subnet under that network
3. Observe that the dhcp port is DOWN
>From the linux bridge log:
2015-09-12 18:25:28.857 ERROR neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent [req-9cf39db9-
5071-4b9a-bcb6-908f759de0f4 None None] Error in agent loop. Devices info: {'current': set(['tap895fe52f-0d', 'tapb2d
9e954-de', 'tap20a094ab-24', 'tap8aebc9c0-89', 'tap108580e4-6f', 'tapd4feefc5-f4']), 'removed': set([]), 'added': se
t(['tap895fe52f-0d', 'tapb2d9e954-de', 'tap20a094ab-24', 'tap8aebc9c0-89', 'tap108580e4-6f', 'tapd4feefc5-f4']), 'up
dated': set([])}
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent Traceback (mos
t recent call last):
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 1110, in daemon_loop
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent sync = sel
f.process_network_devices(device_info)
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 959, in process_netwo
rk_devices
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent resync_a =
self.treat_devices_added_updated(devices_added_updated)
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 998, in treat_devices
_added_updated
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent device_det
ails['port_id']):
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 501, in add_interface
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent tap_device
_name)
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 479, in add_tap_inter
face
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent if bridge_
lib.BridgeDevice(bridge_name).addif(tap_device_name):
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/agent/linux/bridge_lib.py", line 38, in addif
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent return sel
f._brctl(['addif', self.name, interface])
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/agent/linux/bridge_lib.py", line 26, in _brctl
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent return ip_
wrapper.netns.execute(cmd, run_as_root=True)
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/agent/linux/ip_lib.py", line 795, in execute
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent extra_ok_c
odes=extra_ok_codes, **kwargs)
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/agent/linux/utils.py", line 160, in execute
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent raise Runt
imeError(m)
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent RuntimeError:
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent Command: ['brc
tl', 'addif', None, u'tapb2d9e954-de']
>From the code, looks like we need to provide bridge mapping when the
interface mapping is provided:
https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py#L456-L459
But this is not the case as it works in Kilo as bridge mapping option
doesn't exist until Liberty.
Neutron version : Liberty
Attached local.conf here
** Affects: neutron
Importance: Undecided
Status: New
** Attachment added: "local.conf"
https://bugs.launchpad.net/bugs/1495161/+attachment/4462718/+files/local.conf
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1495161
Title:
Cannot add tap interface to the bridge when bridge mappings is not
provided
Status in neutron:
New
Bug description:
I am using linux bridge and I cannot add dhcp tap interface when the
bridge mappings is not provided.
Steps to reproduce:
1. Create a network
2. Create a subnet under that network
3. Observe that the dhcp port is DOWN
From the linux bridge log:
2015-09-12 18:25:28.857 ERROR neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent [req-9cf39db9-
5071-4b9a-bcb6-908f759de0f4 None None] Error in agent loop. Devices info: {'current': set(['tap895fe52f-0d', 'tapb2d
9e954-de', 'tap20a094ab-24', 'tap8aebc9c0-89', 'tap108580e4-6f', 'tapd4feefc5-f4']), 'removed': set([]), 'added': se
t(['tap895fe52f-0d', 'tapb2d9e954-de', 'tap20a094ab-24', 'tap8aebc9c0-89', 'tap108580e4-6f', 'tapd4feefc5-f4']), 'up
dated': set([])}
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent Traceback (mos
t recent call last):
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 1110, in daemon_loop
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent sync = sel
f.process_network_devices(device_info)
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 959, in process_netwo
rk_devices
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent resync_a =
self.treat_devices_added_updated(devices_added_updated)
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 998, in treat_devices
_added_updated
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent device_det
ails['port_id']):
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 501, in add_interface
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent tap_device
_name)
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 479, in add_tap_inter
face
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent if bridge_
lib.BridgeDevice(bridge_name).addif(tap_device_name):
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/agent/linux/bridge_lib.py", line 38, in addif
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent return sel
f._brctl(['addif', self.name, interface])
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/agent/linux/bridge_lib.py", line 26, in _brctl
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent return ip_
wrapper.netns.execute(cmd, run_as_root=True)
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/agent/linux/ip_lib.py", line 795, in execute
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent extra_ok_c
odes=extra_ok_codes, **kwargs)
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent File "/opt/s
tack/neutron/neutron/agent/linux/utils.py", line 160, in execute
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent raise Runt
imeError(m)
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent RuntimeError:
2015-09-12 18:25:28.857 TRACE neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent Command: ['brc
tl', 'addif', None, u'tapb2d9e954-de']
From the code, looks like we need to provide bridge mapping when the
interface mapping is provided:
https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py#L456-L459
But this is not the case as it works in Kilo as bridge mapping option
doesn't exist until Liberty.
Neutron version : Liberty
Attached local.conf here
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1495161/+subscriptions
Follow ups