aboutsummaryrefslogtreecommitdiff
path: root/docker/openvswitch
diff options
context:
space:
mode:
Diffstat (limited to 'docker/openvswitch')
-rwxr-xr-xdocker/openvswitch/ovs-db-server/start.sh22
-rwxr-xr-xdocker/openvswitch/ovs-vswitchd/start.sh15
2 files changed, 10 insertions, 27 deletions
diff --git a/docker/openvswitch/ovs-db-server/start.sh b/docker/openvswitch/ovs-db-server/start.sh
index 89b2e3e92..4d3d772cc 100755
--- a/docker/openvswitch/ovs-db-server/start.sh
+++ b/docker/openvswitch/ovs-db-server/start.sh
@@ -1,25 +1,15 @@
#!/bin/bash
-
set -o errexit
-LOG_FILE="/var/log/openvswitch/ovsdb-server.log"
-DB_FILE="/etc/openvswitch/conf.db"
-UNIXSOCK_DIR="/var/run/openvswitch"
-UNIXSOCK="${UNIXSOCK_DIR}/db.sock"
-
-CMD="/usr/sbin/ovsdb-server"
-ARGS="$DB_FILE -vconsole:emer -vsyslog:err -vfile:info --remote=punix:${UNIXSOCK} --log-file=${LOG_FILE}"
-
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
-
-mkdir -p "${UNIXSOCK_DIR}"
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
-if [[ ! -e "${DB_FILE}" ]]; then
- ovsdb-tool create "${DB_FILE}"
+mkdir -p "/run/openvswitch"
+if [[ ! -e "/etc/openvswitch/conf.db" ]]; then
+ ovsdb-tool create "/etc/openvswitch/conf.db"
fi
-exec $CMD $ARGS
+exec $CMD
diff --git a/docker/openvswitch/ovs-vswitchd/start.sh b/docker/openvswitch/ovs-vswitchd/start.sh
index 3ec2c26b2..792954bb4 100755
--- a/docker/openvswitch/ovs-vswitchd/start.sh
+++ b/docker/openvswitch/ovs-vswitchd/start.sh
@@ -1,19 +1,12 @@
#!/bin/bash
-LOG_FILE="/var/log/openvswitch/ovs-vswitchd.log"
-DB_FILE="/etc/openvswitch/conf.db"
-UNIXSOCK_DIR="/var/run/openvswitch"
-UNIXSOCK="${UNIXSOCK_DIR}/db.sock"
-
-CMD="/usr/sbin/ovs-vswitchd"
-ARGS="unix:${UNIXSOCK} -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file=${LOG_FILE}"
+set -o errexit
# Loading common functions.
source /opt/kolla/kolla-common.sh
-# Execute config strategy
-set_configs
+python /opt/kolla/set_configs.py
+CMD=$(cat /run_command)
modprobe openvswitch
-mkdir -p "${UNIXSOCK_DIR}"
-exec $CMD $ARGS
+exec $CMD