From e3e818ed0ee04a52bd10c71359414fe91af6c9d2 Mon Sep 17 00:00:00 2001 From: Lars Erik Wik Date: Tue, 29 Sep 2026 11:50:35 +0200 Subject: [PATCH] Raised cf-apache.service start timeout to avoid PID-file race The ENT-11189 fix only changed the masterfiles template, which is used only with mpf_enable_cfengine_systemd_component_management. Hubs use this unit by default. Ticket: ENT-11189 Changelog: Title Co-Authored-By: Claude Opus 5.5 Signed-off-by: Lars Erik Wik (cherry picked from commit e5d61b37304c8f16a056be86824fc571b5eba821) --- misc/systemd/cf-apache.service.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/misc/systemd/cf-apache.service.in b/misc/systemd/cf-apache.service.in index 07d0eb24bcf..952e4e50f3b 100644 --- a/misc/systemd/cf-apache.service.in +++ b/misc/systemd/cf-apache.service.in @@ -12,6 +12,11 @@ ExecStart=@workdir@/httpd/bin/apachectl start ExecStop=@workdir@/httpd/bin/apachectl stop ExecReload=@workdir@/httpd/bin/apachectl graceful PIDFile=@workdir@/httpd/httpd.pid +# ENT-11189: apachectl writes the PID file shortly after fork. On a busy host +# (e.g. mid-upgrade with SELinux relabel, cf-postgres and cf-php-fpm churning) +# the default 90s start timeout has been observed to fire while apache is still +# coming up, leaving worker children bound to :80 and the unit in a restart loop. +TimeoutStartSec=300 Restart=always RestartSec=10 UMask=0177