From 94ea43fa555fac20c15cdb4f4214af20913b6270 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Sun, 27 Sep 2015 12:37:23 +0000 Subject: Replace config-external - openvswitch Change-Id: Ib05442c6ee146d2deb49fc235ba16fc7e0c3d6c8 Partially-Implements: blueprint replace-config-external --- docker/openvswitch/ovs-db-server/start.sh | 22 ++++++---------------- docker/openvswitch/ovs-vswitchd/start.sh | 15 ++++----------- 2 files changed, 10 insertions(+), 27 deletions(-) (limited to 'docker') 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 -- cgit v1.2.3