Bug 814645 - systemctl reload httpd.service broken
systemctl reload httpd.service broken
Product: Fedora
Classification: Fedora
Component: httpd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Kaluža
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-04-20 06:28 EDT by Paul Howarth
Modified: 2014-08-20 07:37 EDT (History)
4 users (show)

See Also:
Fixed In Version: httpd-2.4.2-3.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-20 07:37:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Paul Howarth 2012-04-20 06:28:36 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?
Comment 3 Joe Orton 2012-04-20 08:22:13 EDT
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.
Comment 4 Fedora End Of Life 2013-04-03 16:26:28 EDT
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:
Comment 5 Fedora Admin XMLRPC Client 2014-06-30 05:53:39 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 6 Jan Kaluža 2014-08-20 07:37:43 EDT
This should be fixed in all supported Fedora versions, I'm closing this bug.

Note You need to log in before you can comment on or make changes to this bug.