Blame SOURCES/sos-bz1938932-sssd-add-individual-sssd-log-files.patch

5866eb
From ece97a2cbb1620c8667cf293c89c30147820350e Mon Sep 17 00:00:00 2001
5866eb
From: Jan Jansky <jjansky@redhat.com>
5866eb
Date: Tue, 6 Apr 2021 10:44:45 +0200
5866eb
Subject: [PATCH] [sssd] Add individual SSSD log files
5866eb
5866eb
The issue is that SSSD creates individual log files for its
5866eb
components. To be able to track the issue we need all of them.
5866eb
5866eb
With one wildcard copy set we usually get just one truncated
5866eb
log file and this is not very useful for solving issues. We
5866eb
need to track the request accross logs to understand the
5866eb
problem. Also log file names are specific for paricular
5866eb
configuration.
5866eb
5866eb
With this patch we list log files under /var/log/sssd and
5866eb
we add them one by one.
5866eb
5866eb
Related: #2445
5866eb
Resolves: #2476
5866eb
5866eb
Signed-off-by: Jan Jansky <jjansky@redhat.com>
5866eb
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
5866eb
---
5866eb
 sos/plugins/sssd.py | 5 ++++-
5866eb
 1 file changed, 4 insertions(+), 1 deletion(-)
5866eb
5866eb
diff --git a/sos/plugins/sssd.py b/sos/plugins/sssd.py
5866eb
index ea9fdee..0c3aaf8 100644
5866eb
--- a/sos/plugins/sssd.py
5866eb
+++ b/sos/plugins/sssd.py
5866eb
@@ -10,6 +10,7 @@
5866eb
 
5866eb
 from sos.plugins import (Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin,
5866eb
                          SoSPredicate)
5866eb
+from glob import glob
5866eb
 
5866eb
 
5866eb
 class Sssd(Plugin):
5866eb
@@ -23,12 +24,14 @@ class Sssd(Plugin):
5866eb
     def setup(self):
5866eb
         self.add_copy_spec([
5866eb
             "/etc/sssd/sssd.conf",
5866eb
-            "/var/log/sssd/*",
5866eb
             "/var/lib/sss/pubconf/krb5.include.d/*",
5866eb
             # SSSD 1.14
5866eb
             "/etc/sssd/conf.d/*.conf"
5866eb
         ])
5866eb
 
5866eb
+        # add individual log files
5866eb
+        self.add_copy_spec(glob("/var/log/sssd/*log*"))
5866eb
+
5866eb
         # call sssctl commands only when sssd service is running,
5866eb
         # otherwise the command timeouts
5866eb
         sssd_pred = SoSPredicate(self, services=["sssd"])
5866eb
-- 
5866eb
1.8.3.1
5866eb