** Description changed: - The get_devices() method in neutron/agent/linux/ip_lib.py chokes if - 'iproute2' presents interface names containing '@', such as ipip - tunnels: + [Impact] - 513: tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default - link/ipip 0.0.0.0 brd 0.0.0.0 + * The get_devices() method in neutron/agent/linux/ip_lib.py chokes if 'iproute2' presents interface names containing '@', such as ipip tunnels and macvlan devices: + + tunl0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default + clone@eth0: <BROADCAST,MULTICAST> mtu 1454 qdisc noop state DOWN mode DEFAULT + + * The mere presence of one of the above interface names will cause the + code to fail with: - And macvlan devices: + RuntimeError: + Command: ['ip', 'addr', 'show', 'tunl0@NONE'] + Exit code: 1 + Stdout: '' + Stderr: 'Device "tunl0@NONE" does not exist.\n' - 4: clone@eth0: <BROADCAST,MULTICAST> mtu 1454 qdisc noop state DOWN mode DEFAULT group default - link/ether c6:dd:66:a5:f6:5c brd ff:ff:ff:ff:ff:ff - Consider the follow sample code: + [Test Case] - from neutron.agent.linux.ip_lib import IPWrapper + * This has been seen in the vpn_agent.log after upgrading to a xenial kernel (4.4.0-45-generic) in a trusty/icehouse environment. + + /var/log/neutron/vpn_agent.log: + ERROR neutron.agent.linux.interface [-] Failed unplugging interface 'qg-e75da35-63@if10' - ip = IPWrapper() - for iface in ip.get_devices(): - print iface.name, iface.addr.list() - The mere presence of one of the above interface names will cause the - code to fail with: + [Regression Potential] - RuntimeError: - Command: ['ip', 'addr', 'show', 'tunl0@NONE'] - Exit code: 1 - Stdout: '' - Stderr: 'Device "tunl0@NONE" does not exist.\n' + * iproute2 is still used, however, a search path was added + (/sys/class/net) which returns the interfaces without the '@'. - This can cause failures in, e.g., - neutron/plugins/linuxbridge/agent/linuxbridge_neutron_agent.py, which - performs almost exactly the same iteration in the - get_interface_by_ip() method. + * This has been fixed since Kilo so there is minimal regression + potential. + + + [ Other Info ] + + *
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1374663 Title: agent/linux/ip_lib.py does not correctly handle output from 'iproute2' command To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-archive/+bug/1374663/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs