diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-06-24 21:16:50 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-06-24 21:16:50 +0000 |
| commit | 893ddcc73d6a73402989ce94ef8f3701ea6bc6f6 (patch) | |
| tree | 9b9fdcb02183ba9a7ef66ab2b9db8bd39ffc1de4 /docker/common | |
| parent | f23a35651e7ccb7aec9bd3e83cd9783ff79b1942 (diff) | |
| parent | 0971e7eed66a252861b2a4617c4f82edcd838902 (diff) | |
| download | kolla-893ddcc73d6a73402989ce94ef8f3701ea6bc6f6.tar.gz kolla-893ddcc73d6a73402989ce94ef8f3701ea6bc6f6.zip | |
Merge "Add openvswitch container"
Diffstat (limited to 'docker/common')
| -rwxr-xr-x | docker/common/openvswitch/ovs-db-server/start.sh | 16 | ||||
| -rwxr-xr-x | docker/common/openvswitch/ovs-vswitchd/start.sh | 14 |
2 files changed, 30 insertions, 0 deletions
diff --git a/docker/common/openvswitch/ovs-db-server/start.sh b/docker/common/openvswitch/ovs-db-server/start.sh new file mode 100755 index 000000000..a2b4d6c8f --- /dev/null +++ b/docker/common/openvswitch/ovs-db-server/start.sh @@ -0,0 +1,16 @@ +#!/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" + +mkdir -p "${UNIXSOCK_DIR}" + +if [[ ! -e "${DB_FILE}" ]]; then + ovsdb-tool create "${DB_FILE}" +fi + +exec ovsdb-server $DB_FILE -vconsole:emer -vsyslog:err -vfile:info --remote=punix:"${UNIXSOCK}" --log-file="${LOG_FILE}" diff --git a/docker/common/openvswitch/ovs-vswitchd/start.sh b/docker/common/openvswitch/ovs-vswitchd/start.sh new file mode 100755 index 000000000..5ed1fbe75 --- /dev/null +++ b/docker/common/openvswitch/ovs-vswitchd/start.sh @@ -0,0 +1,14 @@ +#!/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}" |
