Merge "swift: Fix missing log directory in Ubuntu"

This commit is contained in:
Zuul 2024-06-10 07:45:41 +00:00 committed by Gerrit Code Review
commit 3956da6b29
2 changed files with 9 additions and 1 deletions

@ -101,6 +101,14 @@ if which journalctl &> /dev/null; then
sudo journalctl --no-pager > $LOG_DIR/syslog.txt sudo journalctl --no-pager > $LOG_DIR/syslog.txt
fi fi
# rsyslog
if [ -d /etc/rsyslog.d ]; then
sudo cp /etc/rsyslogd.d $LOG_DIR/etc/
fi
if [ -f /etc/rsyslog.conf ]; then
sudo cp /etc/rsyslog.conf $LOG_DIR/etc/
fi
# network interfaces # network interfaces
if [ -d /etc/sysconfig/network-scripts ]; then if [ -d /etc/sysconfig/network-scripts ]; then
sudo cp -r /etc/sysconfig/network-scripts $LOG_DIR/etc/sysconfig/ sudo cp -r /etc/sysconfig/network-scripts $LOG_DIR/etc/sysconfig/

@ -14,7 +14,7 @@ class openstack_integration::swift {
before => Anchor['swift::service::begin'], before => Anchor['swift::service::begin'],
} }
if ($facts['os']['name'] == 'Debian') { if ($facts['os']['family'] == 'Debian') {
# Ubuntu/Debian requires particular permissions for rsyslog to work # Ubuntu/Debian requires particular permissions for rsyslog to work
$log_dir_owner = $facts['os']['name'] ? { $log_dir_owner = $facts['os']['name'] ? {
'Debian' => 'swift', 'Debian' => 'swift',