Skip to content
Snippets Groups Projects
Commit 080d926d authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Add config-internal/config-external to OpenvSwitch containers"

parents 4200582d d2d3e74e
No related branches found
No related tags found
No related merge requests found
Showing
with 70 additions and 8 deletions
......@@ -3,3 +3,5 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
RUN yum install -y openvswitch \
&& yum clean all
COPY config-internal.sh config-external.sh /opt/kolla/
../../../../common/openvswitch/ovs-base/config-external.sh
../../../../common/openvswitch/ovs-base/config-external.sh
......@@ -3,5 +3,6 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
COPY ./start.sh /start.sh
CMD ["/start.sh"]
COPY config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"]
../../../../common/openvswitch/ovs-db-server/config-external.sh
\ No newline at end of file
../../../../common/openvswitch/ovs-db-server/config-internal.sh
\ No newline at end of file
......@@ -3,4 +3,6 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
COPY ./start.sh /start.sh
COPY config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"]
../../../../common/openvswitch/ovs-vswitchd/config-external.sh
\ No newline at end of file
../../../../common/openvswitch/ovs-vswitchd/config-internal.sh
\ No newline at end of file
#!/bin/bash
#This file should be a noop. It just needs to exist, but it don't perform any function
#!/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}"
......@@ -7,10 +7,19 @@ 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
# Config-internal script exec out of this function, it does not return here.
set_configs
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}"
exec $CMD $ARGS
#!/bin/bash
#This file should be a noop. It just needs to exist, but it don't perform any function
#!/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}"
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment