Skip to content

Commit

Permalink
Merge pull request #924 from dseevr/reorder_startup
Browse files Browse the repository at this point in the history
scripts/netContain/scripts/{contivNet.sh,ovsInit.sh}: init OVS before doing anything else and load OVS kernel module before starting OVS services
  • Loading branch information
rchirakk authored Jul 20, 2017
2 parents 6e0088a + aba2304 commit 1e2213f
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 1e2213f

Please sign in to comment.