Hi Ovs-experts,
We are observing some weird behaviour with openvswitch-2.9.2 version from
community. We see our ports not being added to ovs-db when we reboot when we
have following:-
This was not happening with openvswitch 2.5.2 version. We have similar config
files on both the setup with TYPE=Ethernet.
We have following bridges : lan-br and test-br with following eths:
Lan-br has : eth2 and eth1
Test-br has: eth3
root@sudhanshu network-scripts]# more ifcfg-eth1
ONBOOT=yes
TYPE=OVSPort >>> IF WE ADD THESE GREEN LINES, IT WORKS and ports are also added
OVS_BRIDGE=lan-br
DEVICE_TYPE=ovs
DEVICE=eth1
BOOTPROTO=none
NM_CONTROLLED=no
NOZEROCONF=yes
IPV6_AUTOCONF=no
ZONE=public
[root@sudhanshu network-scripts]# more ifcfg-eth2
ONBOOT=yes
TYPE=OVSPort
OVS_BRIDGE=lan-br
DEVICE_TYPE=ovs
DEVICE=eth2
BOOTPROTO=none
NM_CONTROLLED=no
NOZEROCONF=yes
IPV6_AUTOCONF=no
ZONE=public
[root@nfvis network-scripts]#
[root@nfvis network-scripts]# more ifcfg-eth3
ONBOOT=yes
TYPE=OVSPort
OVS_BRIDGE=test-br
DEVICE_TYPE=ovs
DEVICE=eth3
BOOTPROTO=none
NM_CONTROLLED=no
NOZEROCONF=yes
IPV6_AUTOCONF=no
ZONE=public
Above configuration works good and we always see ports are not lost and db is
intact and configuring del-port and add-port.
If we remove following lines from our
/etc/sysconfig/network-scripts/ifcfg-eth1, eth2, eth3 respectively[RED
ONES-STRIKED OUT], and we add TYPE=Ethernet, then we don’t see our ports being
added to ovs-db.
root@sudhanshu network-scripts]# more ifcfg-eth1
ONBOOT=yes
TYPE=Ethernet
TYPE=OVSPort
OVS_BRIDGE=lan-br
DEVICE_TYPE=ovs
DEVICE=eth1
BOOTPROTO=none
NM_CONTROLLED=no
NOZEROCONF=yes
IPV6_AUTOCONF=no
ZONE=public
[root@sudhanshu network-scripts]# more ifcfg-eth2
ONBOOT=yes
TYPE=Ethernet
TYPE=OVSPort
OVS_BRIDGE=lan-br
DEVICE_TYPE=ovs
DEVICE=eth2
BOOTPROTO=none
NM_CONTROLLED=no
NOZEROCONF=yes
IPV6_AUTOCONF=no
ZONE=public
[root@nfvis network-scripts]#
[root@nfvis network-scripts]# more ifcfg-eth3
ONBOOT=yes
TYPE=Ethernet
TYPE=OVSPort
OVS_BRIDGE=test-br
DEVICE_TYPE=ovs
DEVICE=eth3
BOOTPROTO=none
NM_CONTROLLED=no
NOZEROCONF=yes
IPV6_AUTOCONF=no
ZONE=public
By looking into the source code, we found that, we should always add
TYPE=OVSPort in interface configuration. i.e we should always have these
TYPE=OVSPort in ifcfg-eth1, ifcfg-eth2 ifcfg-eth3 files.
121 OVSPort)
122 ifup_ovs_bridge
123 ${OTHERSCRIPT} ${CONFIG} ${2}
124 # The port might be already in the database but not yet
125 # in the datapath. So, remove the stale interface first.
126 ovs-vsctl -t ${TIMEOUT} \
127 -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
128 -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS ${OVS_EXTRA+--
$OVS_EXTRA}
129 OVSINTF=${DEVICE} /sbin/ifup "$OVS_BRIDGE"
Is it a mandate to have following configuration for ovs to recognize this port
– even if port is ethernet type port?
Please let us your thoughts.
Regards
Sudhanshu Bhutani
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss