Blame SOURCES/sos-bz1938932-sssd-collect-memory-cache-individual-files.patch

5866eb
From 7d6cb4e71b79d1f2393db475bf65dc4e143d09fa Mon Sep 17 00:00:00 2001
5866eb
From: Jan Jansky <jjansky@redhat.com>
5866eb
Date: Tue, 6 Apr 2021 11:06:13 +0200
5866eb
Subject: [PATCH] [sssd] Collect memory cache individual files
5866eb
5866eb
By default SSSD collects all memory cache files:
5866eb
* /var/lib/sss/mc/passwd
5866eb
* /var/lib/sss/mc/group
5866eb
* /var/lib/sss/mc/initgroups
5866eb
5866eb
They all are included in 25MB size limit for sosreport.
5866eb
This commits add memory cache files one - by - one,
5866eb
this way 25MB size limit will be aplied per file.
5866eb
5866eb
Related: #2462
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 | 13 +++++++------
5866eb
 1 file changed, 7 insertions(+), 6 deletions(-)
5866eb
5866eb
diff --git a/sos/plugins/sssd.py b/sos/plugins/sssd.py
5866eb
index 7bdd167..c532800 100644
5866eb
--- a/sos/plugins/sssd.py
5866eb
+++ b/sos/plugins/sssd.py
5866eb
@@ -23,21 +23,22 @@ class Sssd(Plugin):
5866eb
 
5866eb
     def setup(self):
5866eb
         self.add_copy_spec([
5866eb
-            # Main config file
5866eb
+            # main config file
5866eb
             "/etc/sssd/sssd.conf",
5866eb
             # SSSD 1.14
5866eb
             "/etc/sssd/conf.d/*.conf",
5866eb
-            # Main logs directory
5866eb
-            "/var/log/sssd/*",
5866eb
-            # Memory cache
5866eb
-            "/var/lib/sss/mc/*",
5866eb
-            # Dynamic Kerberos configuration
5866eb
+            # dynamic Kerberos configuration
5866eb
             "/var/lib/sss/pubconf/krb5.include.d/*"
5866eb
         ])
5866eb
 
5866eb
         # add individual log files
5866eb
         self.add_copy_spec(glob("/var/log/sssd/*log*"))
5866eb
 
5866eb
+        # add memory cache
5866eb
+        self.add_copy_spec(["/var/lib/sss/mc/passwd",
5866eb
+                            "/var/lib/sss/mc/group",
5866eb
+                            "/var/lib/sss/mc/initgroups"])
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