From 47ce0982249ee7ce12b38eae5ce3ee6a9b5df52e Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 4 Feb 2025 12:54:48 -0500 Subject: [PATCH] Configure the pki-tomcatd service systemd timeout IPA defines a startup timeout that is primarily used during installation to extend service start-up timeouts on slower systems. This tends to work ok when runing pki-spawn but can fail when systemd is starting the tomcat service. Use the value of startup_timeout to set TimeoutStartSec in the pki-tomcat systemd override file ipa.conf. This will preserve the necessary startup_timeout for all future restarts. This was seen with a very slow HSM where installation was successful (pki-spawn) but pki-tomcatd startup timed out at the end of the installation. To increase the value in installation one needs to create the file /etc/ipa/installer.conf with contents: [global] startup_timeout = 300 (or whatever) Fixes: https://pagure.io/freeipa/issue/9743 Signed-off-by: Rob Crittenden Reviewed-By: Florence Blanc-Renaud Reviewed-By: Alexander Bokovoy --- ipaserver/install/cainstance.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py index 76718036dbd317651edc98ce631405e42bf814d7..c8ecde8f2e9649d57012fcda937ee5816105df4e 100644 --- a/ipaserver/install/cainstance.py +++ b/ipaserver/install/cainstance.py @@ -713,7 +713,12 @@ class CAInstance(DogtagInstance): f.write('[Service]\n') f.write('Environment=LC_ALL=C.UTF-8\n') f.write('ExecStartPost={}\n'.format(paths.IPA_PKI_WAIT_RUNNING)) + f.write('TimeoutStartSec=%d\n' % api.env.startup_timeout) tasks.systemd_daemon_reload() + logger.info( + "Set start up timeout of pki-tomcatd service to %d seconds", + api.env.startup_timeout + ) def safe_backup_config(self): """ -- 2.48.1