On Tue, Jan 16, 2018 at 05:34:43AM +0000, Vishal Deep Ajmera wrote:
> Hi Flavio,
> 
> Thanks for looking into this issue. I believe the order of initialization 
> does not matter. 
> Just an FYI: I tried with your suggestion of renaming the bridge name to zbr0 
> but it did 
> not solve the issue. In my opinion the issue is with networking scripts which 
> is not 
> triggering route addition again for the bridge LOCAL port. Let me explain it 
> a little more.
> 
> As you see in the steps I followed, first we add the bridge br0 ($ifup br0). 
> At this time the 
> bridge LOCAL interface gets a random MAC address. Once the interface is 
> configured, the 
> networking service gets to see a new interface and invokes the route addition 
> (due to 
> presence of file route-br0) via ifup-eth/ifup-post script.
> 
> Next when we add dpdk-bond ports ($ifup dpdkbond0), the bridge LOCAL 
> interface is 
> reconfigured with MAC address of one of the dpdk ports (since these are 
> physical ports). 
> At this time OVS only makes IOCTL calls for setting device flags to DOWN and 
> UP.
> Once the device flag is set to UP again, I was assuming that 
> ifup-eth/ifup-post script should get 
> invoked again but it did not happen. Thus all the routes for br0 interface 
> did not get added 
> again.
> 
> I hope this clarifies the issue.

If I recall correctly, when you put any interface down, the routes
will go away, so this is a generic Linux issue.

Then you have correctly disabled NetworkManager (it doesn't support
OVS yet), but the network services doesn't support events like UP or
DOWN.  It only supports hotplug events, like a new interface showing
up or going away.

So, when you bring the interface I am 99% sure it doesn't run any
service or scripts.

Now, the ordering matters because depending on the iface's name, it
will be scheduled before of after another.  If the bridge comes first,
then when the bonding port is configured, there is no chance to
restore bridge routing.  So, the other way around would be better, but
unfortunately I see here that ifup-ovs will notice that the bridge is
already up (configured as dependency for the bond port) and will skip
running the post script (which includes the route configuration).

Perhaps if you use OVSIntPort instead of the bridge port (which should
be the same software device) to hold your network configuration, then
looks like the ifup-ovs would run the post/route scripts if the order
is correct, but I haven't tested myself.

fbl



> 
> Warm Regards,
> Vishal Ajmera
> 
> -----Original Message-----
> From: Flavio Leitner [mailto:f...@sysclose.org] 
> Sent: Tuesday, January 16, 2018 9:17 AM
> To: Vishal Deep Ajmera <vishal.deep.ajm...@ericsson.com>
> Cc: ovs-discuss@openvswitch.org
> Subject: Re: [ovs-discuss] REDHAT: Route issue with dpdk-bond ports
> 
> On Tue, Dec 26, 2017 at 08:31:49AM +0000, Vishal Deep Ajmera wrote:
> > Hi,
> > 
> > On Red-Hat, kernel IP Routes are getting deleted whenever a dpdk-bond 
> > port is added to "netdev" type bridge.  I understand that when a DPDK 
> > port is added to ovs, the bridge port (LOCAL) is reconfigured with MAC 
> > address which requires IOCTL calls to bring the device down and up. 
> > This causes kernel to remove the routes.
> > 
> > Can someone please have a look and let me know what am I missing here ?
> 
> Hi Vishal,
> 
> I think when the interface goes down to change the MAC address, the routes 
> will go away.  The only way to to make sure the routes will be restored is to 
> change the initialization order.
> 
> In your case, br0 is initialized first, then dpdkbond0 which will cause the 
> issue.
> 
> The order is alphabetical, so try renaming br0 to something like
> zbr0 to see if the bridge is reconfigured with the routes.
> 
> fbl
> 
> > Steps to reproduce the issue:
> > 
> > # Create the bridge in OVS.
> > $ ifup br0
> > 
> > # Dump the routes
> > $ ip route
> > 11.2.0.0/24 dev br0 proto kernel scope link src 11.2.0.26
> > 100.100.100.10 via 11.2.0.202 dev br0
> > 100.100.100.20 via 11.2.0.201 dev br0
> > 169.254.0.0/16 dev br0 scope link metric 1036
> > 
> > # Add DPDK Bond to bridge br0
> > $ ifup dpdkbond0
> > 
> > # Dump the routes
> > $ ip route
> > 11.2.0.0/24 dev br0 proto kernel scope link src 11.2.0.26
> > --> Other routes for br0 are missing.
> > 
> > Here are the ifcfg files for the bridge BR0 and DPDKBOND0 port along 
> > with static routes.
> > =============================================
> > $ cat ifcfg-br0
> > DEVICE=br0
> > ONBOOT=yes
> > HOTPLUG=no
> > NM_CONTROLLED=no
> > PEERDNS=no
> > DEVICETYPE=ovs
> > TYPE=OVSUserBridge
> > BOOTPROTO=static
> > IPADDR=11.2.0.26
> > NETMASK=255.255.255.0
> > OVS_EXTRA="set bridge br0 fail_mode=standalone"
> > 
> > $ cat ifcfg-dpdkbond0
> > DEVICE=dpdkbond0
> > ONBOOT=yes
> > HOTPLUG=no
> > NM_CONTROLLED=no
> > PEERDNS=no
> > DEVICETYPE=ovs
> > TYPE=OVSDPDKBond
> > OVS_BRIDGE=br0
> > BOND_IFACES="dpdk0 dpdk1"
> > OVS_OPTIONS="bond_mode=balance-tcp other_config:lacp-time=fast lacp=passive"
> > 
> > $ cat route-br0
> > 100.100.100.10 via 11.2.0.201 dev br0
> > 100.100.100.20 via 11.2.0.202 dev br0
> > 
> > =============================================
> > 
> > Warm Regards,
> > Vishal
> > 
> 
> > _______________________________________________
> > discuss mailing list
> > disc...@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
> 
> 
> --
> Flavio
> 

-- 
Flavio

_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to