diff options
Diffstat (limited to 'docker/common/openvswitch/ovs-vswitchd')
| -rw-r--r-- | docker/common/openvswitch/ovs-vswitchd/config-external.sh | 3 | ||||
| -rw-r--r-- | docker/common/openvswitch/ovs-vswitchd/config-internal.sh | 15 | ||||
| -rwxr-xr-x | docker/common/openvswitch/ovs-vswitchd/start.sh | 17 |
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 |
