[Bug 1374663] Re: agent/linux/ip_lib.py does not correctly handle output from 'iproute2' command

Shane 1374663 at bugs.launchpad.net
Thu Oct 27 18:37:04 UTC 2016


** Tags added: sts

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to neutron in Ubuntu.
https://bugs.launchpad.net/bugs/1374663

Title:
  agent/linux/ip_lib.py does not correctly handle output from 'iproute2'
  command

Status in Ubuntu Cloud Archive:
  New
Status in neutron:
  Fix Released
Status in neutron package in Ubuntu:
  New

Bug description:
  The get_devices() method in neutron/agent/linux/ip_lib.py chokes if
  'iproute2' presents interface names containing '@', such as ipip
  tunnels:

      513: tunl0 at NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default 
          link/ipip 0.0.0.0 brd 0.0.0.0

  And macvlan devices:

      4: clone at 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:

      from neutron.agent.linux.ip_lib import IPWrapper

      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:

      RuntimeError: 
      Command: ['ip', 'addr', 'show', 'tunl0 at NONE']
      Exit code: 1
      Stdout: ''
      Stderr: 'Device "tunl0 at NONE" does not exist.\n'

  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1374663/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list