Red Hat Bugzilla – Bug 970041
RFE: ExecRestartPre or similar
Last modified: 2014-06-13 07:55:22 EDT
Description of problem:
We're still finding cases where systemd integration for httpd is not producing optimal behaviour. One such case is restart/stop handling.
Say the service is running, the user changes the configuration and runs
"systemctl restart httpd.service". Ideally that command should fail without changing the state of the running service. To implement this we really need an ExecRestartPre or something which works like ExecStartPre for restart.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. systemctl start httpd
2. echo FOO > /etc/httpd/conf.d/foo.conf
3. systemctl restart httpd
a) if we use an ExecStop in httpd.service which checks the config and returns an error, this triggers service-stop timeout handling and is ugly
b) if we omit ExecStop it just kills the daemon
"systemctl restart" command returns immediately with failure
We really need this or something like this to fix bug 969972, otherwise we are going to ship with awkward systemd integration in RHEL7. Is this feasible?
(In reply to Joe Orton from comment #2)
> We really need this or something like this to fix bug 969972, otherwise we
> are going to ship with awkward systemd integration in RHEL7. Is this
isn't what the user wants a "reload" ?
# systemctl reload httpd
Not sure what you mean by "what the user wants".
Reload works fine here, but we also want good behaviour for *this* case ("restart" or "stop" in the presence of a config error).
The bug appears also with service httpd stop, confirmed on 20131018.0 compose
Raising the priority to high since it causes issues with httpd testing.
I am not sure what is scope of this bug anymore. systemctl restart should do stop and start of a service and I am pretty convinced that this should be done even if the configuration file is corrupted. In the case that user wants to reload new configuration he should use systemctl reload (and there apache can ignore it when the configuration is wrong and write something to logs).
And about the hang was not it fixed with https://bugzilla.redhat.com/show_bug.cgi?id=1012795 ?
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.