Add syslog option to glance and nova.
| ... | ... |
@@ -27,7 +27,7 @@ registry_port = 9191 |
| 27 | 27 |
log_file = %DEST%/glance/api.log |
| 28 | 28 |
|
| 29 | 29 |
# Send logs to syslog (/dev/log) instead of to file specified by `log_file` |
| 30 |
-use_syslog = False |
|
| 30 |
+use_syslog = %SYSLOG% |
|
| 31 | 31 |
|
| 32 | 32 |
# ============ Notification System Options ===================== |
| 33 | 33 |
|
| ... | ... |
@@ -19,7 +19,7 @@ log_file = %DEST%/glance/registry.log |
| 19 | 19 |
filesystem_store_datadir = %DEST%/glance/images |
| 20 | 20 |
|
| 21 | 21 |
# Send logs to syslog (/dev/log) instead of to file specified by `log_file` |
| 22 |
-use_syslog = False |
|
| 22 |
+use_syslog = %SYSLOG% |
|
| 23 | 23 |
|
| 24 | 24 |
# SQLAlchemy connection string for the reference implementation |
| 25 | 25 |
# registry server. Any valid SQLAlchemy connection string is fine. |
| ... | ... |
@@ -78,6 +78,9 @@ source ./stackrc |
| 78 | 78 |
# Destination path for installation ``DEST`` |
| 79 | 79 |
DEST=${DEST:-/opt/stack}
|
| 80 | 80 |
|
| 81 |
+# Configure services to syslog instead of writing to individual log files |
|
| 82 |
+SYSLOG=${SYSLOG:-False}
|
|
| 83 |
+ |
|
| 81 | 84 |
# OpenStack is designed to be run as a regular user (Dashboard will fail to run |
| 82 | 85 |
# as root, since apache refused to startup serve content from root user). If |
| 83 | 86 |
# stack.sh is run as root, it automatically creates a stack user with |
| ... | ... |
@@ -460,11 +463,13 @@ if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then |
| 460 | 460 |
sudo sed -e "s,%SQL_CONN%,$BASE_SQL_CONN/glance,g" -i $GLANCE_CONF |
| 461 | 461 |
sudo sed -e "s,%SERVICE_TOKEN%,$SERVICE_TOKEN,g" -i $GLANCE_CONF |
| 462 | 462 |
sudo sed -e "s,%DEST%,$DEST,g" -i $GLANCE_CONF |
| 463 |
+ sudo sed -e "s,%SYSLOG%,$SYSLOG,g" -i $GLANCE_CONF |
|
| 463 | 464 |
|
| 464 | 465 |
GLANCE_API_CONF=$GLANCE_DIR/etc/glance-api.conf |
| 465 | 466 |
cp $FILES/glance-api.conf $GLANCE_API_CONF |
| 466 | 467 |
sudo sed -e "s,%DEST%,$DEST,g" -i $GLANCE_API_CONF |
| 467 | 468 |
sudo sed -e "s,%SERVICE_TOKEN%,$SERVICE_TOKEN,g" -i $GLANCE_API_CONF |
| 469 |
+ sudo sed -e "s,%SYSLOG%,$SYSLOG,g" -i $GLANCE_API_CONF |
|
| 468 | 470 |
fi |
| 469 | 471 |
|
| 470 | 472 |
# Nova |
| ... | ... |
@@ -579,6 +584,9 @@ fi |
| 579 | 579 |
if [ -n "$MULTI_HOST" ]; then |
| 580 | 580 |
add_nova_flag "--multi_host=$MULTI_HOST" |
| 581 | 581 |
fi |
| 582 |
+if [ "$SYSLOG" != "False" ]; then |
|
| 583 |
+ add_nova_flag "--use_syslog=1" |
|
| 584 |
+fi |
|
| 582 | 585 |
|
| 583 | 586 |
# Nova Database |
| 584 | 587 |
# ~~~~~~~~~~~~~ |