Red Hat Bugzilla – Bug 814645
systemctl reload httpd.service broken
Last modified: 2014-08-20 07:37:43 EDT
The systemd unit file for httpd has an incorrect ExecReload entry:
ExecReload=/usr/sbin/httpd $OPTIONS -t
ExecReload=/usr/sbin/httpd -HUP $MAINPID
That should be "kill -HUP" rather than "httpd -HUP".
I think the "httpd -t" run is redundant, as httpd checks for syntax errors and reports any that it finds when it gets a SIGHUP. Unfortunately it then seems to die, which is contrary to what the upstream documentation says at http://httpd.apache.org/docs/2.4/stopping.html:
As with a graceful restart, a syntax check is run before the restart
is attempted. If your configuration file has errors in it, the restart
will not be attempted, and you will receive notification of the syntax
Does that need raising upstream, or is it just me?
Thanks Paul! Bizarre nobody has caught that upstream, looks to have gone back a long way. The init script used to handle this, so we were protected from it...
fixed now http://svn.apache.org/viewvc?view=revision&revision=1328345
There is perhaps an argument that running kill $MAINPID directly is better, since then there can be no ambiguity about the httpd parent pid. But it seems like systemd does *not* check the exit code of the first listed ExecReload before
running the second, so then we would lose the safety of only reloading if the config was good. So never mind.
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.
(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)
More information and reason for this action is here:
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This should be fixed in all supported Fedora versions, I'm closing this bug.