Add syslog option, off by default.
Add syslog option to glance and nova.
This commit is contained in:
parent
698fc619b7
commit
5855a64434
3 changed files with 10 additions and 2 deletions
|
@ -27,7 +27,7 @@ registry_port = 9191
|
||||||
log_file = %DEST%/glance/api.log
|
log_file = %DEST%/glance/api.log
|
||||||
|
|
||||||
# Send logs to syslog (/dev/log) instead of to file specified by `log_file`
|
# Send logs to syslog (/dev/log) instead of to file specified by `log_file`
|
||||||
use_syslog = False
|
use_syslog = %SYSLOG%
|
||||||
|
|
||||||
# ============ Notification System Options =====================
|
# ============ Notification System Options =====================
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ log_file = %DEST%/glance/registry.log
|
||||||
filesystem_store_datadir = %DEST%/glance/images
|
filesystem_store_datadir = %DEST%/glance/images
|
||||||
|
|
||||||
# Send logs to syslog (/dev/log) instead of to file specified by `log_file`
|
# Send logs to syslog (/dev/log) instead of to file specified by `log_file`
|
||||||
use_syslog = False
|
use_syslog = %SYSLOG%
|
||||||
|
|
||||||
# SQLAlchemy connection string for the reference implementation
|
# SQLAlchemy connection string for the reference implementation
|
||||||
# registry server. Any valid SQLAlchemy connection string is fine.
|
# registry server. Any valid SQLAlchemy connection string is fine.
|
||||||
|
|
8
stack.sh
8
stack.sh
|
@ -78,6 +78,9 @@ source ./stackrc
|
||||||
# Destination path for installation ``DEST``
|
# Destination path for installation ``DEST``
|
||||||
DEST=${DEST:-/opt/stack}
|
DEST=${DEST:-/opt/stack}
|
||||||
|
|
||||||
|
# Configure services to syslog instead of writing to individual log files
|
||||||
|
SYSLOG=${SYSLOG:-False}
|
||||||
|
|
||||||
# OpenStack is designed to be run as a regular user (Dashboard will fail to run
|
# OpenStack is designed to be run as a regular user (Dashboard will fail to run
|
||||||
# as root, since apache refused to startup serve content from root user). If
|
# as root, since apache refused to startup serve content from root user). If
|
||||||
# stack.sh is run as root, it automatically creates a stack user with
|
# stack.sh is run as root, it automatically creates a stack user with
|
||||||
|
@ -460,11 +463,13 @@ if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then
|
||||||
sudo sed -e "s,%SQL_CONN%,$BASE_SQL_CONN/glance,g" -i $GLANCE_CONF
|
sudo sed -e "s,%SQL_CONN%,$BASE_SQL_CONN/glance,g" -i $GLANCE_CONF
|
||||||
sudo sed -e "s,%SERVICE_TOKEN%,$SERVICE_TOKEN,g" -i $GLANCE_CONF
|
sudo sed -e "s,%SERVICE_TOKEN%,$SERVICE_TOKEN,g" -i $GLANCE_CONF
|
||||||
sudo sed -e "s,%DEST%,$DEST,g" -i $GLANCE_CONF
|
sudo sed -e "s,%DEST%,$DEST,g" -i $GLANCE_CONF
|
||||||
|
sudo sed -e "s,%SYSLOG%,$SYSLOG,g" -i $GLANCE_CONF
|
||||||
|
|
||||||
GLANCE_API_CONF=$GLANCE_DIR/etc/glance-api.conf
|
GLANCE_API_CONF=$GLANCE_DIR/etc/glance-api.conf
|
||||||
cp $FILES/glance-api.conf $GLANCE_API_CONF
|
cp $FILES/glance-api.conf $GLANCE_API_CONF
|
||||||
sudo sed -e "s,%DEST%,$DEST,g" -i $GLANCE_API_CONF
|
sudo sed -e "s,%DEST%,$DEST,g" -i $GLANCE_API_CONF
|
||||||
sudo sed -e "s,%SERVICE_TOKEN%,$SERVICE_TOKEN,g" -i $GLANCE_API_CONF
|
sudo sed -e "s,%SERVICE_TOKEN%,$SERVICE_TOKEN,g" -i $GLANCE_API_CONF
|
||||||
|
sudo sed -e "s,%SYSLOG%,$SYSLOG,g" -i $GLANCE_API_CONF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Nova
|
# Nova
|
||||||
|
@ -579,6 +584,9 @@ fi
|
||||||
if [ -n "$MULTI_HOST" ]; then
|
if [ -n "$MULTI_HOST" ]; then
|
||||||
add_nova_flag "--multi_host=$MULTI_HOST"
|
add_nova_flag "--multi_host=$MULTI_HOST"
|
||||||
fi
|
fi
|
||||||
|
if [ "$SYSLOG" != "False" ]; then
|
||||||
|
add_nova_flag "--use_syslog=1"
|
||||||
|
fi
|
||||||
|
|
||||||
# Nova Database
|
# Nova Database
|
||||||
# ~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~
|
||||||
|
|
Loading…
Reference in a new issue