answers: File exists`` printed on the console. This comes from ifup-eth
trying to add zeroconf route multiple times and is harmless.
+* ``ifup`` on OVSDPDKPort or OVSDPDKBond may result in change of bridge mac address.
+ Since OVS changes the device state to DOWN before changing its mac address this
+ result in loss of bridge configuration (e.g. routes). ``ifup-ovs`` perform post-up
+ operation on the bridge again to restore configuration.
+
Examples
--------
;;
OVSDPDKPort)
ifup_ovs_bridge
+ BRIDGE_MAC_ORIG=$(get_hwaddr $OVS_BRIDGE)
ovs-vsctl -t ${TIMEOUT} \
-- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
-- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \
-- set Interface "$DEVICE" type=dpdk ${OVS_EXTRA+-- $OVS_EXTRA}
+ BRIDGE_MAC=$(get_hwaddr $OVS_BRIDGE)
+ # The bridge may change its MAC to be the lower one among all its
+ # ports. If that happens, bridge configuration (e.g. routes) will
+ # be lost. Restore the post-up bridge configuration again.
+ if [ "$BRIDGE_MAC_ORIG" != "$BRIDGE_MAC" ]; then
+ ${OTHERSCRIPT} "$OVS_BRIDGE"
+ fi
;;
OVSDPDKRPort)
ifup_ovs_bridge
;;
OVSDPDKBond)
ifup_ovs_bridge
+ BRIDGE_MAC_ORIG=$(get_hwaddr $OVS_BRIDGE)
for _iface in $BOND_IFACES; do
IFACE_TYPES="${IFACE_TYPES} -- set interface ${_iface} type=dpdk"
done
ovs-vsctl -t ${TIMEOUT} \
-- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
-- add-bond "$OVS_BRIDGE" "$DEVICE" ${BOND_IFACES} $OVS_OPTIONS ${IFACE_TYPES} ${OVS_EXTRA+-- $OVS_EXTRA}
+ BRIDGE_MAC=$(get_hwaddr $OVS_BRIDGE)
+ # The bridge may change its MAC to be the lower one among all its
+ # ports. If that happens, bridge configuration (e.g. routes) will
+ # be lost. Restore the post-up bridge configuration again.
+ if [ "$BRIDGE_MAC_ORIG" != "$BRIDGE_MAC" ]; then
+ ${OTHERSCRIPT} "$OVS_BRIDGE"
+ fi
;;
*)
echo $"Invalid OVS interface type $TYPE"