Skip to content

Commit

Permalink
scripts/netContain/scripts/{contivNet.sh,ovsInit.sh}: init OVS before…
Browse files Browse the repository at this point in the history
… doing anything else and load OVS kernel module before starting OVS services

Signed-off-by: Bill Robinson <[email protected]>
  • Loading branch information
dseevr committed Jul 20, 2017
1 parent 7fe5fe3 commit aba2304
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 6 additions & 7 deletions scripts/netContain/scripts/contivNet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ while getopts ":xmp:v:i:c:drl:o:" opt; do
esac
done

if [ $cleanup == false ] && [ $netplugin == true ]; then
echo "Initializing OVS"
/contiv/scripts/ovsInit.sh
echo "Initialized OVS"
fi

if [ $cleanup == true ] || [ $reinit == true ]; then
ovs-vsctl del-br contivVlanBridge || true
ovs-vsctl del-br contivVxlanBridge || true
Expand All @@ -95,12 +101,6 @@ if [ $netplugin == false ] && [ $netmaster == false ]; then
exit 1
fi

if [ $netplugin == true ]; then
echo "Initializing OVS"
/contiv/scripts/ovsInit.sh
echo "Initialized OVS"
fi

mkdir -p /opt/contiv/
mkdir -p /var/contiv/log/

Expand Down Expand Up @@ -135,7 +135,6 @@ if [ $netmaster == true ]; then
done
elif [ $netplugin == true ]; then
echo "Starting netplugin"
modprobe openvswitch

while true; do
if [ -f /tmp/restart_netplugin ]; then
Expand Down
2 changes: 2 additions & 0 deletions scripts/netContain/scripts/ovsInit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

set -euo pipefail

modprobe openvswitch

mkdir -p /var/run/openvswitch

sleep 2
Expand Down

0 comments on commit aba2304

Please sign in to comment.