Add config-internal/config-external to OpenvSwitch containers
Partially Implements: Blueprint standard-start Co-Authored-By: Swapnil Kulkarni <me@coolsvap.net> Change-Id: I52ed4b56efe3fc4ebbc108b2fe7e9d69eb0f0928
This commit is contained in:
parent
fcda6a06d8
commit
d2d3e74e19
@ -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/
|
||||
|
@ -0,0 +1 @@
|
||||
../../../../common/openvswitch/ovs-base/config-external.sh
|
@ -0,0 +1 @@
|
||||
../../../../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"]
|
||||
|
@ -0,0 +1 @@
|
||||
../../../../common/openvswitch/ovs-db-server/config-external.sh
|
@ -0,0 +1 @@
|
||||
../../../../common/openvswitch/ovs-db-server/config-internal.sh
|
@ -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"]
|
||||
|
1
docker/centos/binary/openvswitch/ovs-vswitchd/config-external.sh
Symbolic link
1
docker/centos/binary/openvswitch/ovs-vswitchd/config-external.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../common/openvswitch/ovs-vswitchd/config-external.sh
|
1
docker/centos/binary/openvswitch/ovs-vswitchd/config-internal.sh
Symbolic link
1
docker/centos/binary/openvswitch/ovs-vswitchd/config-internal.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../../common/openvswitch/ovs-vswitchd/config-internal.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
|
16
docker/common/openvswitch/ovs-db-server/config-internal.sh
Normal file
16
docker/common/openvswitch/ovs-db-server/config-internal.sh
Normal file
@ -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}"
|
@ -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
|
||||
|
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
#This file should be a noop. It just needs to exist, but it don't perform any function
|
15
docker/common/openvswitch/ovs-vswitchd/config-internal.sh
Normal file
15
docker/common/openvswitch/ovs-vswitchd/config-internal.sh
Normal file
@ -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}"
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user