Bug 1373085

Summary: OVS interface not configured by network service after ovs service restart when datapath_type=netdev
Product: Red Hat Enterprise Linux 7 Reporter: Peng Liu <pliu>
Component: openvswitch-dpdkAssignee: Thadeu Lima de Souza Cascardo <cascardo>
Status: CLOSED CANTFIX QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: aconole, aloughla, atragler, fleitner, jjung, jkalliya, rkhan, supadhya
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-26 17:38:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Peng Liu 2016-09-05 06:42:31 UTC
Description of problem:
OVS interface not configured by network service after ovs service restart when datapath_type=netdev. Static IP is not set.

Version-Release number of selected component (if applicable):
openvswitch-dpdk-2.4.0-0.10346.git97bab959.3.el7_2.x86_64

How reproducible:


Steps to Reproduce:
1. Create a bridge with datapath_type=netdev
2. Set static IP to bridge interface
3. Bind a dpdk interface to that bridge
3. restart openvswitch service

Actual results:
[root@host3 ~]# ip a | grep -A4 br-test
13: br-test: <BROADCAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 500
    link/ether 0e:06:4f:f9:8b:41 brd ff:ff:ff:ff:ff:ff
    inet 11.0.0.21/24 brd 11.0.0.255 scope global br-test
       valid_lft forever preferred_lft forever
    inet6 fe80::c06:4fff:fef9:8b41/64 scope link 
       valid_lft forever preferred_lft forever
[root@host3 ~]# cat /etc/sysconfig/network-scripts/ifcfg-br-test 
DEVICE=br-test
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
PEERDNS=no
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=11.0.0.21
NETMASK=255.255.255.0
[root@host3 ~]# ovs-vsctl show
f04b1d4b-92b2-470f-8ade-ee801acd5a64
    Manager "ptcp:6640:127.0.0.1"
    Bridge br-test
        Port br-test
            Interface br-test
                type: internal
        Port "dpdk0"
            Interface "dpdk0"
                type: dpdk
    ovs_version: "2.4.0"
[root@host3 ~]# systemctl restart openvswitch
[1528664.619879] device ovs-netdev left promiscuous mode
[1528664.622395] device br-test left promiscuous mode
[1528667.936960] device ovs-netdev entered promiscuous mode
[1528667.998921] device br-test entered promiscuous mode
[root@host3 ~]# ip a | grep -A4 br-test
15: br-test: <BROADCAST,PROMISC> mtu 1500 qdisc noop state DOWN qlen 500
    link/ether 0e:06:4f:f9:8b:41 brd ff:ff:ff:ff:ff:ff

Expected results:
The IP should be set as defined in ifcfg script after ovs service restart

Additional info:
Manually 'ifup br-test', can set the IP back.

Comment 2 Peng Liu 2016-09-08 02:14:52 UTC
I also found that, even seting the datapath_type=netdev to a bridge will make the interface down and lost its IP address.

Comment 4 Thadeu Lima de Souza Cascardo 2016-09-30 17:11:03 UTC
Hi, Peng Liu.

When you change the datapath type, OVS will recreate the bridge. OVS is not concerned with the IP address configuration, so you need to rely on something like ifcfg, Network Manager or something else managing the IP addresses for you.

In this particular case, if you change ifcfg files to make the bridge use the netdev datapath, then ifdown and ifup the interface, does it work? If it doesn't, then, can you open a new bug?

In the case of this bug, that is, that OVS restarts will make the IP address go away, recent changes to OVS systemd unit files might fix this. Can you test packages containing those fixes?

Cascardo.

Comment 5 Thadeu Lima de Souza Cascardo 2016-10-26 17:38:19 UTC
Hi, Peng Liu.

The latest OVS package will not restart during an upgrade. I know you were not doing an upgrade. But our conclusion is that whenever restarting OVS, the network will need to be restarted as well. Or whatever sets up the IP addresses to the bridges and internal ports will have to do it again after OVS restarts.

Thanks for your report.
Cascardo.