Skip to content
Prev Previous commit
Next Next commit
Do not modify rsyslog files if rsyslog is not used.
Swift was missing an 'if [[ $SYSLOG != "False" ]]' statement which is used
by other services, and therefor failed with a 'No such file or directory'
error when 'SYSLOG=False' was set in localrc.

Closes-Bug: 1308461

Change-Id: I8655a955ebb322516d92bee418b93d4cc23bdc5c
  • Loading branch information
Yves-Gwenael Bourhis
Yves-Gwenael Bourhis committed Apr 17, 2014
commit f894c2ab805f9dfc0dfdd3668ccd3a83ee4eb9f2
11 changes: 7 additions & 4 deletions lib/swift
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,13 @@ EOF
rm -rf ${swift_log_dir}
mkdir -p ${swift_log_dir}/hourly
sudo chown -R ${STACK_USER}:adm ${swift_log_dir}
sed "s,%SWIFT_LOGDIR%,${swift_log_dir}," $FILES/swift/rsyslog.conf | sudo \
tee /etc/rsyslog.d/10-swift.conf
# restart syslog to take the changes
sudo killall -HUP rsyslogd

if [[ $SYSLOG != "False" ]]; then
sed "s,%SWIFT_LOGDIR%,${swift_log_dir}," $FILES/swift/rsyslog.conf | sudo \
tee /etc/rsyslog.d/10-swift.conf
# restart syslog to take the changes
sudo killall -HUP rsyslogd
fi

if is_apache_enabled_service swift; then
_config_swift_apache_wsgi
Expand Down