Merge "Make variables in OVS container configurable"

This commit is contained in:
Jenkins 2015-07-28 21:41:41 +00:00 committed by Gerrit Code Review
commit 062388fca9
5 changed files with 24 additions and 17 deletions

View File

@ -2,15 +2,14 @@
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"
check_required_vars OVS_DB_FILE \
OVS_UNIXSOCK
mkdir -p "${UNIXSOCK_DIR}"
if [[ ! -e "${DB_FILE}" ]]; then
ovsdb-tool create "${DB_FILE}"
mkdir -p "$(dirname $OVS_UNIXSOCK)"
if [[ ! -e "${OVS_DB_FILE}" ]]; then
ovsdb-tool create "${OVS_DB_FILE}"
fi
exec ovsdb-server $DB_FILE -vconsole:emer -vsyslog:err -vfile:info --remote=punix:"${UNIXSOCK}" --log-file="${LOG_FILE}"
exec ovsdb-server $OVS_DB_FILE -vconsole:emer -vsyslog:err -vfile:info --remote=punix:"${OVS_UNIXSOCK}" --log-file="${OVS_LOG_FILE}"

View File

@ -2,14 +2,11 @@
set -o errexit
check_required_vars OVS_UNIXSOCK
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 "$(dirname $OVS_UNIXSOCK)"
mkdir -p "${UNIXSOCK_DIR}"
exec ovs-vswitchd unix:"${UNIXSOCK}" -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file="${LOG_FILE}"
exec ovs-vswitchd unix:"${OVS_UNIXSOCK}" -vconsole:emer -vsyslog:err -vfile:info --mlockall --log-file="${OVS_LOG_FILE}"

View File

@ -191,6 +191,10 @@ all containers. This allows a simple method of ensuring every type of node
CEILOMETER_DB_PASSWORD=<password> - Ceilometer DB password
CEILOMETER_DB_USER=<ceilometer> - Ceilometer DB User
CEILOMETER_KEYSTONE_USER=<ceilometer> - Ceilometer Keystone user
OVS_DB_FILE=<file-path> - OVS DB file path
OVS_LOG_FILE=<file-path> - OVS Log file path
OVS_UNIXSOCK=<file-path> - OVS UNIX SOCK file location
[Minimum environment variable setup guide.](https://github.com/stackforge/kolla/blob/master/docs/minimal-environment-vars.md)

View File

@ -499,11 +499,12 @@ In order for each service to function, there is a minimum set of required variab
# Ovs-db-server
None
OVS_DB_FILE
OVS_UNIXSOCK
# Ovs-vswitchd
None
OVS_UNIXSOCK
# Rabbitmq

View File

@ -88,6 +88,9 @@ CINDER_API_LOG_FILE=
CINDER_VOLUME_LOG_FILE=
CINDER_BACKUP_LOG_FILE=
CINDER_SCHEDULER_LOG_FILE=
OVS_DB_FILE="/etc/openvswitch/conf.db"
OVS_LOG_FILE=
OVS_UNIXSOCK="/var/run/openvswitch/db.sock"
# RabbitMQ
RABBITMQ_SERVICE_HOST=$HOST_IP
@ -438,6 +441,9 @@ CEILOMETER_DB_NAME=$CEILOMETER_DB_NAME
CEILOMETER_DB_PASSWORD=$CEILOMETER_DB_PASSWORD
CEILOMETER_DB_USER=$CEILOMETER_DB_USER
CEILOMETER_KEYSTONE_USER=$CEILOMETER_KEYSTONE_USER
OVS_DB_FILE=$OVS_DB_FILE
OVS_LOG_FILE=$OVS_LOG_FILE
OVS_UNIXSOCK=$OVS_UNIXSOCK
EOF
echo Please customize your FLAT_INTERFACE to a different network then your