Bug 464815

Summary: "service httpd reload" says "ok" even though the reload actually failed
Product: [Fedora] Fedora Reporter: Dennis Jacobfeuerborn <dennisml>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: jorton
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-30 18:56:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dennis Jacobfeuerborn 2008-09-30 16:54:42 UTC
After making a typo in the log directory name of vhost and reloading the httpd config the system responded with "Reloading httpd: [Ok]". The truth was that the daemon couldn't find the log directory and terminated.

The best course of action for the daemon would be to refuse the new configuration and keep running with the old but at least the init.d script should properly report the failure of the daemon and not respond with "Ok".

Comment 1 Joe Orton 2008-09-30 18:56:31 UTC
1) The init script does run "httpd -t" to test the configuration before doing a reload

2) running "httpd -t" does not catch all possible configuration errors, nor would it be possible to catch all cases where the *running* httpd binary would fail after a reload (notably, if the package has been updated, the running httpd might not be the same executable as /usr/sbin/httpd on disk)

3) "reload" simply SIGHUPs the daemon, and reports success if the daemon has been signalled; there is no validation of the subsequent state of the daemon beyond that, nor do I think any such would be feasible/appropriate

Hope that helps!

Improving the situation for (2) is vaguely on my long-distance radar of things to improve upstream, FWIW, but the status quo is behaviour as intended.