← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1703510] [NEW] ML2-Linuxbridge not keep routes on physical interface

 

Public bug reported:

When using ML2-Linuxbridge flat network, the bridge is dynamically created when the first VM using the flat network is provisioned. The bridge is dynamically deleted when the last VM using the flat network is deleted.
During the switch over, all configuration on the physical interface is moved from the physical device to the bridge device.
In today's ML2-Linux bridge implementation, only the ip address and the gateway are retained. There is no consideration to move the routes associated with the physical interface and they are lost.
In the case when openstack components communicate with openstack controller, the connectivity would be lost after the first VM is provisioned.

To reproduce the issue, add arbitrary route on the underflying physical interface, e.g., eth0, 
1. "route add -net 10.75.0.0/16 gw 20.20.20.1" prior to start ML2-Linux-bridge agent. 
2. Start ML2-Linuxbridge agent, and provision a new VM to use flat network.
3. do a route show "ip route list" and observe the 10.75.0.0 routes disapppears.

This happens from kilo code to master branch.

The relevant code on master branch is

neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py

    def update_interface_ip_details(self, destination, source):
        # Returns True if there were IPs or a gateway moved
        updated = False
        for ip_version in (constants.IP_VERSION_4, constants.IP_VERSION_6):
            ips, gateway = self.get_interface_details(source, ip_version)
            if ips or gateway:
                self._update_interface_ip_details(destination, source, ips,
                                                  gateway)
                updated = True

        return updated

only ips and gateway are considered, routes associated with the
interafce is not considered at all.

** 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/1703510

Title:
  ML2-Linuxbridge not keep routes on physical interface

Status in neutron:
  New

Bug description:
  When using ML2-Linuxbridge flat network, the bridge is dynamically created when the first VM using the flat network is provisioned. The bridge is dynamically deleted when the last VM using the flat network is deleted.
  During the switch over, all configuration on the physical interface is moved from the physical device to the bridge device.
  In today's ML2-Linux bridge implementation, only the ip address and the gateway are retained. There is no consideration to move the routes associated with the physical interface and they are lost.
  In the case when openstack components communicate with openstack controller, the connectivity would be lost after the first VM is provisioned.

  To reproduce the issue, add arbitrary route on the underflying physical interface, e.g., eth0, 
  1. "route add -net 10.75.0.0/16 gw 20.20.20.1" prior to start ML2-Linux-bridge agent. 
  2. Start ML2-Linuxbridge agent, and provision a new VM to use flat network.
  3. do a route show "ip route list" and observe the 10.75.0.0 routes disapppears.

  This happens from kilo code to master branch.

  The relevant code on master branch is

  neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py

      def update_interface_ip_details(self, destination, source):
          # Returns True if there were IPs or a gateway moved
          updated = False
          for ip_version in (constants.IP_VERSION_4, constants.IP_VERSION_6):
              ips, gateway = self.get_interface_details(source, ip_version)
              if ips or gateway:
                  self._update_interface_ip_details(destination, source, ips,
                                                    gateway)
                  updated = True

          return updated

  only ips and gateway are considered, routes associated with the
  interafce is not considered at all.

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