Bug 814645

Summary: systemctl reload httpd.service broken
Product: [Fedora] Fedora Reporter: Paul Howarth <paul>
Component: httpdAssignee: Jan Kaluža <jkaluza>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: jkaluza, jorton, pahan, Philippe.Vouters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: httpd-2.4.2-3.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-20 11:37:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Paul Howarth 2012-04-20 10:28:36 UTC
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
  error(s).

Does that need raising upstream, or is it just me?

Comment 3 Joe Orton 2012-04-20 12:22:13 UTC
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 20:26:28 UTC
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:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 5 Fedora Admin XMLRPC Client 2014-06-30 09:53:39 UTC
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 11:37:43 UTC
This should be fixed in all supported Fedora versions, I'm closing this bug.