mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix renewal lock issues on installation
- Make sure that the file /var/run/ipa/renewal.lock is deleted upon uninstallation, in order to avoid subsequent installation issues. - Modify certmonger renewal script: restart the http/dirsrv services only if they were already running - Cleanup certmonger ra renewal script: no need to restart httpd - Reorder during http install: request the SSL cert before adding ipa-service-guard Rationale: when a CA helper is modified, certmonger launches the helper with various operations (FETCH_ROOTS, ...) If the CA helper is once again modified, the on-going helper is killed. This can lead to ipa-service-guard being killed and not releasing the renew lock. If the SSL cert is requested with IPA helper before ipa-service-guard is added, we avoid this locking issue. Part of the refactoring effort, certificates sub-effort. https://fedorahosted.org/freeipa/ticket/6433 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
4b3bd54242
commit
198cd5fab3
@@ -30,7 +30,6 @@ import traceback
|
||||
from ipapython import ipautil
|
||||
from ipalib import api
|
||||
from ipaserver.install import certs, cainstance, krainstance
|
||||
from ipaplatform import services
|
||||
from ipaplatform.paths import paths
|
||||
|
||||
|
||||
@@ -68,15 +67,6 @@ def _main():
|
||||
shutil.rmtree(tmpdir)
|
||||
api.Backend.ldap2.disconnect()
|
||||
|
||||
# Now restart Apache so the new certificate is available
|
||||
syslog.syslog(syslog.LOG_NOTICE, "Restarting httpd")
|
||||
try:
|
||||
services.knownservices.httpd.restart()
|
||||
except Exception as e:
|
||||
syslog.syslog(syslog.LOG_ERR, "Cannot restart httpd: %s" % e)
|
||||
else:
|
||||
syslog.syslog(syslog.LOG_NOTICE, "Restarted httpd")
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
|
||||
@@ -39,7 +39,8 @@ def _main():
|
||||
syslog.syslog(syslog.LOG_NOTICE, "certmonger restarted dirsrv instance '%s'" % instance)
|
||||
|
||||
try:
|
||||
services.knownservices.dirsrv.restart(instance)
|
||||
if services.knownservices.dirsrv.is_running():
|
||||
services.knownservices.dirsrv.restart(instance)
|
||||
except Exception as e:
|
||||
syslog.syslog(syslog.LOG_ERR, "Cannot restart dirsrv (instance: '%s'): %s" % (instance, str(e)))
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@ def _main():
|
||||
syslog.syslog(syslog.LOG_NOTICE, 'certmonger restarted httpd')
|
||||
|
||||
try:
|
||||
services.knownservices.httpd.restart()
|
||||
if services.knownservices.httpd.is_running():
|
||||
services.knownservices.httpd.restart()
|
||||
except Exception as e:
|
||||
syslog.syslog(syslog.LOG_ERR, "Cannot restart httpd: %s" % str(e))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user