Enable the ccache sweep timer during installation

The timer was only being enabled during package installation
if IPA was configured. So effectively only on upgrade.

Add as a separate installation step after the ccache directory
is configured.

Fixes: https://pagure.io/freeipa/issue/9107

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Rob Crittenden 2022-02-07 10:39:55 -05:00
parent 926b707d31
commit c396ca0164

View File

@ -140,6 +140,8 @@ class HTTPInstance(service.Service):
self.step("publish CA cert", self.__publish_ca_cert) self.step("publish CA cert", self.__publish_ca_cert)
self.step("clean up any existing httpd ccaches", self.step("clean up any existing httpd ccaches",
self.remove_httpd_ccaches) self.remove_httpd_ccaches)
self.step("enable ccache sweep",
self.enable_ccache_sweep)
self.step("configuring SELinux for httpd", self.configure_selinux_for_httpd) self.step("configuring SELinux for httpd", self.configure_selinux_for_httpd)
if not self.is_kdcproxy_configured(): if not self.is_kdcproxy_configured():
self.step("create KDC proxy config", self.create_kdcproxy_conf) self.step("create KDC proxy config", self.create_kdcproxy_conf)
@ -177,6 +179,11 @@ class HTTPInstance(service.Service):
[paths.SYSTEMD_TMPFILES, '--create', '--prefix', paths.IPA_CCACHES] [paths.SYSTEMD_TMPFILES, '--create', '--prefix', paths.IPA_CCACHES]
) )
def enable_ccache_sweep(self):
ipautil.run(
[paths.SYSTEMCTL, 'enable', 'ipa-ccache-sweep.timer']
)
def __configure_http(self): def __configure_http(self):
self.update_httpd_service_ipa_conf() self.update_httpd_service_ipa_conf()
self.update_httpd_wsgi_conf() self.update_httpd_wsgi_conf()