From b3251241bee7826b4dbb06529bcf173e72a3bab9 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 3 Jun 2024 23:54:20 +0900 Subject: [PATCH] swift: Fix missing log directory in Ubuntu ... and capture rsyslog config files to ensure that rsyslog is properly configured. Change-Id: I0b9884b092706f633513b2bd49d368efe924585a --- copy_logs.sh | 8 ++++++++ manifests/swift.pp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/copy_logs.sh b/copy_logs.sh index c302a4b18..4ea33a170 100755 --- a/copy_logs.sh +++ b/copy_logs.sh @@ -101,6 +101,14 @@ if which journalctl &> /dev/null; then sudo journalctl --no-pager > $LOG_DIR/syslog.txt 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 if [ -d /etc/sysconfig/network-scripts ]; then sudo cp -r /etc/sysconfig/network-scripts $LOG_DIR/etc/sysconfig/ diff --git a/manifests/swift.pp b/manifests/swift.pp index 89fd12c56..334d4d897 100644 --- a/manifests/swift.pp +++ b/manifests/swift.pp @@ -14,7 +14,7 @@ class openstack_integration::swift { before => Anchor['swift::service::begin'], } - if ($facts['os']['name'] == 'Debian') { + if ($facts['os']['family'] == 'Debian') { # Ubuntu/Debian requires particular permissions for rsyslog to work $log_dir_owner = $facts['os']['name'] ? { 'Debian' => 'swift',