ML2-Linuxbridge not keep routes on physical interface

Bug #1703510 reported by Aihua Edward Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
In Progress
Undecided
Aihua Edward Li

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.

Changed in neutron:
status: New → Confirmed
assignee: nobody → Aihua Edward Li (aihuaedwardli)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/558016

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by "Rodolfo Alonso <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/558016

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.