a99c7c
From 9b6d0bb1245c4891ccc270f360d0f72a4b1444c1 Mon Sep 17 00:00:00 2001
a99c7c
From: Rob Crittenden <rcritten@redhat.com>
a99c7c
Date: Mon, 7 Feb 2022 10:39:55 -0500
a99c7c
Subject: [PATCH] Enable the ccache sweep timer during installation
a99c7c
a99c7c
The timer was only being enabled during package installation
a99c7c
if IPA was configured. So effectively only on upgrade.
a99c7c
a99c7c
Add as a separate installation step after the ccache directory
a99c7c
is configured.
a99c7c
a99c7c
Fixes: https://pagure.io/freeipa/issue/9107
a99c7c
a99c7c
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
a99c7c
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
a99c7c
---
a99c7c
 ipaserver/install/httpinstance.py | 7 +++++++
a99c7c
 1 file changed, 7 insertions(+)
a99c7c
a99c7c
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py
a99c7c
index 732bb58d49addcb2a9f7698d577527257a17fe66..50ccf5e5031c37171cebe6f20232f3bd645cedeb 100644
a99c7c
--- a/ipaserver/install/httpinstance.py
a99c7c
+++ b/ipaserver/install/httpinstance.py
a99c7c
@@ -140,6 +140,8 @@ class HTTPInstance(service.Service):
a99c7c
         self.step("publish CA cert", self.__publish_ca_cert)
a99c7c
         self.step("clean up any existing httpd ccaches",
a99c7c
                   self.remove_httpd_ccaches)
a99c7c
+        self.step("enable ccache sweep",
a99c7c
+                  self.enable_ccache_sweep)
a99c7c
         self.step("configuring SELinux for httpd", self.configure_selinux_for_httpd)
a99c7c
         if not self.is_kdcproxy_configured():
a99c7c
             self.step("create KDC proxy config", self.create_kdcproxy_conf)
a99c7c
@@ -177,6 +179,11 @@ class HTTPInstance(service.Service):
a99c7c
             [paths.SYSTEMD_TMPFILES, '--create', '--prefix', paths.IPA_CCACHES]
a99c7c
         )
a99c7c
 
a99c7c
+    def enable_ccache_sweep(self):
a99c7c
+        ipautil.run(
a99c7c
+            [paths.SYSTEMCTL, 'enable', 'ipa-ccache-sweep.timer']
a99c7c
+        )
a99c7c
+
a99c7c
     def __configure_http(self):
a99c7c
         self.update_httpd_service_ipa_conf()
a99c7c
         self.update_httpd_wsgi_conf()
a99c7c
-- 
a99c7c
2.34.1
a99c7c