Skip to content

Commit

Permalink
Merge pull request #2007 from abhat/bz_1854355
Browse files Browse the repository at this point in the history
Bug 1869886: Fix to configure vmxnet3 driver in multicast mode
  • Loading branch information
openshift-merge-robot committed Aug 26, 2020
2 parents 79be903 + 414a222 commit afc9074
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions templates/common/_base/files/configure-ovs-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ contents:
# key files under /etc/NetworkManager/system-connections/
# Managing key files is outside of the scope of this script
# if the interface is of type vmxnet3 add multicast capability for that driver
# REMOVEME: Once BZ:1854355 is fixed, this needs to get removed.
function configure_driver_options {
intf=$1
driver=$(cat "/sys/class/net/${intf}/device/uevent" | grep DRIVER | awk -F "=" '{print $2}')
echo "Driver name is" $driver
if [ "$driver" = "vmxnet3" ]; then
ifconfig "$intf" allmulti
fi
}
iface=""
counter=0
# find default interface
Expand All @@ -32,6 +43,10 @@ contents:
done
if [ "$iface" = "br-ex" ]; then
# handle vlans and bonds etc if they have already been
# configured via nm key files and br-ex is already up
ifaces=$(ovs-vsctl list-ifaces ${iface})
for intf in $ifaces; do configure_driver_options $intf; done
echo "Networking already configured and up for br-ex!"
exit 0
fi
Expand Down Expand Up @@ -99,6 +114,7 @@ contents:
if nmcli --fields GENERAL.STATE conn show ovs-if-br-ex | grep -i "activated"; then
echo "OVS successfully configured"
ip a show br-ex
configure_driver_options ${iface}
exit 0
fi
counter=$((counter+1))
Expand All @@ -110,6 +126,7 @@ contents:
if nmcli conn up ovs-if-br-ex; then
echo "OVS successfully configured"
ip a show br-ex
configure_driver_options ${iface}
exit 0
fi
sleep 5
Expand Down

0 comments on commit afc9074

Please sign in to comment.