aboutsummaryrefslogtreecommitdiff
path: root/docker/common/openvswitch/ovs-vswitchd
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-07-09 22:44:23 +0000
committerGerrit Code Review <review@openstack.org>2015-07-09 22:44:23 +0000
commit080d926da09448ee344f34bee13a7003f83734b2 (patch)
tree13931487c715bf0634f02e063991bf850773bdbe /docker/common/openvswitch/ovs-vswitchd
parent4200582d956fef75edabdf237dc4284e0c8ab937 (diff)
parentd2d3e74e193b2ec5bdda8029b75218a10435a9a4 (diff)
downloadkolla-080d926da09448ee344f34bee13a7003f83734b2.tar.gz
kolla-080d926da09448ee344f34bee13a7003f83734b2.zip
Merge "Add config-internal/config-external to OpenvSwitch containers"
Diffstat (limited to 'docker/common/openvswitch/ovs-vswitchd')
-rw-r--r--docker/common/openvswitch/ovs-vswitchd/config-external.sh3
-rw-r--r--docker/common/openvswitch/ovs-vswitchd/config-internal.sh15
-rwxr-xr-xdocker/common/openvswitch/ovs-vswitchd/start.sh17
3 files changed, 29 insertions, 6 deletions
diff --git a/docker/common/openvswitch/ovs-vswitchd/config-external.sh b/docker/common/openvswitch/ovs-vswitchd/config-external.sh
new file mode 100644
index 000000000..9ada4efcb
--- /dev/null
+++ b/docker/common/openvswitch/ovs-vswitchd/config-external.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+#This file should be a noop. It just needs to exist, but it don't perform any function
diff --git a/docker/common/openvswitch/ovs-vswitchd/config-internal.sh b/docker/common/openvswitch/ovs-vswitchd/config-internal.sh
new file mode 100644
index 000000000..1a18ab958
--- /dev/null
+++ b/docker/common/openvswitch/ovs-vswitchd/config-internal.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -o errexit
+
+modprobe openvswitch
+
+LOG_FILE="/var/log/openvswitch/ovs-vswitchd.log"
+DB_FILE="/etc/openvswitch/conf.db"
+UNIXSOCK_DIR="/var/run/openvswitch"
+UNIXSOCK="${UNIXSOCK_DIR}/db.sock"
+
+mkdir -p "${UNIXSOCK_DIR}"
+
+exec ovs-vswitchd unix:"${UNIXSOCK}" -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file="${LOG_FILE}"
+
diff --git a/docker/common/openvswitch/ovs-vswitchd/start.sh b/docker/common/openvswitch/ovs-vswitchd/start.sh
index 5ed1fbe75..148ad5b56 100755
--- a/docker/common/openvswitch/ovs-vswitchd/start.sh
+++ b/docker/common/openvswitch/ovs-vswitchd/start.sh
@@ -1,14 +1,19 @@
#!/bin/bash
-
-set -o errexit
-
-modprobe openvswitch
-
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}"
+
+# Loading common functions.
+source /opt/kolla/kolla-common.sh
+
+# Config-internal script exec out of this function, it does not return here.
+set_configs
+
+modprobe openvswitch
mkdir -p "${UNIXSOCK_DIR}"
-exec ovs-vswitchd unix:"${UNIXSOCK}" -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file="${LOG_FILE}"
+exec $CMD $ARGS