Skip to content

Commit

Permalink
Modify ovs-ctl in start_ovs_netdev so that kernel module is not loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
antoninbas committed Nov 26, 2019
1 parent 7b5b570 commit eb106dc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build/images/scripts/start_ovs_netdev
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ hwaddr=$(ip link show eth0 | grep link/ether | awk '{print $2}')
inet=$(ip addr show eth0 | grep "inet " | awk '{ print $2 }')
gw=$(ip route | grep default | awk '{ print $3 }')

# Modify ovs-ctl so that the kernel module is no longer loaded since it is not
# needed when using OVS in userspace mode. It also enables running OVS with the
# netdev datapath type on platforms which do not have the OVS kernel module.
# This is easier than starting daemons manually...
function fix_ovs_ctl {
sed -i 's/\(\w*\)\(insert_mod_if_required || return 1\)/\1# \2/' /usr/share/openvswitch/scripts/ovs-ctl
}

# See http://docs.openvswitch.org/en/latest/howto/userspace-tunneling/
function add_br_phy {
log_info $CONTAINER_NAME "Creating OVS br-phy bridge for netdev datapath type"
Expand Down Expand Up @@ -65,6 +73,8 @@ function quit {
# exit with code 128 + SIGNAL
trap "quit" INT TERM

fix_ovs_ctl

start_ovs
add_br_phy

Expand Down

0 comments on commit eb106dc

Please sign in to comment.