← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1728080] [NEW] linuxbridge-agent not reassigning all IP address when creating new bridge

 

Public bug reported:

When creating a new bridge the linuxbridge-agent (ensure_bridge()) is
calling update_interface_ip_details(bridge_name, interface, ips,
gateway) to reassign all IP addresses and routes from the underlying
physical interface to the bridge.

However when the underlying interface has multiple addresses assigned
that share the same subnet it will only reassign the first IP address to
the bridge. E.g. consider this underlying interface

7: bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 52:54:77:77:01:01 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.2/24 brd 192.168.122.255 scope global bond0
       valid_lft forever preferred_lft forever
    inet 192.168.122.4/24 brd 192.168.122.255 scope global secondary bond0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:77ff:fe77:101/64 scope link 
       valid_lft forever preferred_lft forever

After the agent took over and create a bridge on it will only have
192.168.122.2/24 assigned.

I believe the bug was introduced with:
https://review.openstack.org/#/c/474170/

Relevant log excerpt (this is a newton based install, but the problem
exists in master as well):

2017-10-27 14:18:26.464 21233 DEBUG neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Done starting bridge brqcd296387-00 for subinterface bond0 ensure_bridge /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py:383
2017-10-27 14:18:26.464 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command: ['ip', 'addr', 'show', 'brqcd296387-00', 'to', '192.168.122.2/24'] create_process /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:89
2017-10-27 14:18:26.480 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
2017-10-27 14:18:26.480 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command (rootwrap daemon): ['ip', '-4', 'addr', 'add', '192.168.122.2/24', 'scope', 'global', 'dev', 'brqcd296387-00', 'brd', '192.168.122.255'] execute_rootwrap_daemon /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:105
2017-10-27 14:18:26.483 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
2017-10-27 14:18:26.483 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command: ['ip', 'addr', 'show', 'brqcd296387-00', 'to', '192.168.122.4/24'] create_process /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:89
2017-10-27 14:18:26.488 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
2017-10-27 14:18:26.489 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command (rootwrap daemon): ['ip', '-4', 'route', 'replace', 'default', 'via', '192.168.122.1', 'metric', '100', 'dev', 'brqcd296387-00'] execute_rootwrap_daemon /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:105
2017-10-27 14:18:26.493 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
2017-10-27 14:18:26.493 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command (rootwrap daemon): ['ip', '-4', 'route', 'del', 'default', 'via', '192.168.122.1', 'dev', 'bond0'] execute_rootwrap_daemon /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:105
2017-10-27 14:18:26.495 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
2017-10-27 14:18:26.496 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command (rootwrap daemon): ['ip', '-4', 'addr', 'del', '192.168.122.2/24', 'dev', 'bond0'] execute_rootwrap_daemon /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:105
2017-10-27 14:18:26.498 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
2017-10-27 14:18:26.498 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command (rootwrap daemon): ['ip', '-4', 'addr', 'del', '192.168.122.4/24', 'dev', 'bond0'] execute_rootwrap_daemon /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:105
2017-10-27 14:18:26.501 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
2017-10-27 14:18:26.501 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command (rootwrap daemon): ['brctl', 'addif', 'brqcd296387-00', 'bond0'] execute_rootwrap_daemon /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:105

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1728080

Title:
  linuxbridge-agent not reassigning all IP address when creating new
  bridge

Status in neutron:
  New

Bug description:
  When creating a new bridge the linuxbridge-agent (ensure_bridge()) is
  calling update_interface_ip_details(bridge_name, interface, ips,
  gateway) to reassign all IP addresses and routes from the underlying
  physical interface to the bridge.

  However when the underlying interface has multiple addresses assigned
  that share the same subnet it will only reassign the first IP address
  to the bridge. E.g. consider this underlying interface

  7: bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
      link/ether 52:54:77:77:01:01 brd ff:ff:ff:ff:ff:ff
      inet 192.168.122.2/24 brd 192.168.122.255 scope global bond0
         valid_lft forever preferred_lft forever
      inet 192.168.122.4/24 brd 192.168.122.255 scope global secondary bond0
         valid_lft forever preferred_lft forever
      inet6 fe80::5054:77ff:fe77:101/64 scope link 
         valid_lft forever preferred_lft forever

  After the agent took over and create a bridge on it will only have
  192.168.122.2/24 assigned.

  I believe the bug was introduced with:
  https://review.openstack.org/#/c/474170/

  Relevant log excerpt (this is a newton based install, but the problem
  exists in master as well):

  2017-10-27 14:18:26.464 21233 DEBUG neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Done starting bridge brqcd296387-00 for subinterface bond0 ensure_bridge /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py:383
  2017-10-27 14:18:26.464 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command: ['ip', 'addr', 'show', 'brqcd296387-00', 'to', '192.168.122.2/24'] create_process /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:89
  2017-10-27 14:18:26.480 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
  2017-10-27 14:18:26.480 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command (rootwrap daemon): ['ip', '-4', 'addr', 'add', '192.168.122.2/24', 'scope', 'global', 'dev', 'brqcd296387-00', 'brd', '192.168.122.255'] execute_rootwrap_daemon /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:105
  2017-10-27 14:18:26.483 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
  2017-10-27 14:18:26.483 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command: ['ip', 'addr', 'show', 'brqcd296387-00', 'to', '192.168.122.4/24'] create_process /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:89
  2017-10-27 14:18:26.488 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
  2017-10-27 14:18:26.489 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command (rootwrap daemon): ['ip', '-4', 'route', 'replace', 'default', 'via', '192.168.122.1', 'metric', '100', 'dev', 'brqcd296387-00'] execute_rootwrap_daemon /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:105
  2017-10-27 14:18:26.493 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
  2017-10-27 14:18:26.493 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command (rootwrap daemon): ['ip', '-4', 'route', 'del', 'default', 'via', '192.168.122.1', 'dev', 'bond0'] execute_rootwrap_daemon /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:105
  2017-10-27 14:18:26.495 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
  2017-10-27 14:18:26.496 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command (rootwrap daemon): ['ip', '-4', 'addr', 'del', '192.168.122.2/24', 'dev', 'bond0'] execute_rootwrap_daemon /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:105
  2017-10-27 14:18:26.498 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
  2017-10-27 14:18:26.498 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command (rootwrap daemon): ['ip', '-4', 'addr', 'del', '192.168.122.4/24', 'dev', 'bond0'] execute_rootwrap_daemon /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:105
  2017-10-27 14:18:26.501 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Exit code: 0 execute /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:150
  2017-10-27 14:18:26.501 21233 DEBUG neutron.agent.linux.utils [req-63495c60-52fd-4d0c-acf3-2ccb80aead39 - - - - -] Running command (rootwrap daemon): ['brctl', 'addif', 'brqcd296387-00', 'bond0'] execute_rootwrap_daemon /usr/lib/python2.7/site-packages/neutron/agent/linux/utils.py:105

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1728080/+subscriptions


Follow ups