Too long tunnel devices names
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
High
|
Darragh O'Reilly |
Bug Description
Openvswitch neutron agent create too long names for tunnel devices.
Ports name are created like %type-%remoteip.
For example for gre type tunnel, name is gre-192.168.201.10 which exceed max length for linux network devices (15 chars).
This name pass throw openvswitch, but create failed port with ofport -1 and proceed with error like this:
2014-02-17 11:25:14.048 22908 ERROR neutron.
Command: ['sudo', '/usr/bin/
Exit code: 1
Stdout: ''
Stderr: 'ovs-ofctl: -1: negative values not supported for in_port\n'
This bug affect only devices with long ip address 10.0.0.1 will pass, but 192.168.201.10 fail.
Found in HAVANA with:
openvswitch: 1.9.3-1
linux: 3.2.54-2
But I think length limit will apply on all versions.
Changed in neutron: | |
status: | New → Confirmed |
Changed in neutron: | |
assignee: | nobody → Darragh O'Reilly (darragh-oreilly) |
Changed in neutron: | |
importance: | Undecided → High |
milestone: | none → icehouse-rc1 |
Changed in neutron: | |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | icehouse-rc1 → 2014.1 |
Running this: agent.linux. ovs_lib import OVSBridge br_name= 'br-tun' , root_helper='sudo') add_tunnel_ port('gre- 100.100. 100.100' , '100.100.100.100',
'100. 100.100. 99', tunnel_type='gre')
from neutron.
br_tun = OVSBridge(
br_tun.
on:
$ uname -a
Linux devstack 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ sudo ovs-vsctl show | tail -1
ovs_version: "1.4.0+build0"
returns '-1'
And using a port name <=15 chars is ok.
But running the same on:
$ uname -a
Linux netnode 3.8.0-32-generic #47~precise1-Ubuntu SMP Wed Oct 2 16:19:35 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ sudo ovs-vsctl show | tail -1
ovs_version: "1.10.2"
returns a positive integer in a string, ie no problem.
When using the OVS plugin, 'id' is returned from the tunnel_sync rpc, and so there is no problem. But the ML2 plugin does not return an id, and so the remote ip is used: /github. com/openstack/ neutron/ blob/stable/ havana/ neutron/ plugins/ openvswitch/ agent/ovs_ neutron_ agent.py# L1029 'ip_address' ])
https:/
tunnel_id = tunnel.get('id', tunnel[
tun_name = '%s-%s' % (tunnel_type, tunnel_id)
One solution would be to use the hex of the IP address which will always be 8 chars, so even with the 'vxlan-' prefix, port_name will only be 14 chars. The port name just needs to be unique.