Bug 818052
Summary: | RFE: Could an ExecRestartPre option be added for the service files. | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ben Marzinski <bmarzins> |
Component: | systemd | Assignee: | systemd-maint |
Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | dtardon, johannbg, lpoetter, metherid, plautrba, systemd-maint |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-08-12 14:27:44 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: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 784611 |
Description
Ben Marzinski
2012-05-02 05:45:09 UTC
Hmm I had looked into that a bit when I came across this in legacy sysv initscripts and in all of them ExecStartPre seemed to suffice so running this on every startup would that be harmful as in adding "ExecStartPre=-/path/to/command" to the unit file? Looking at the restart option there [1] it only calls the classic start/stop no magic is being done there restart() { stop start } Also there seems to be a quite a difference between the Red Hat initscript and the Suse one so if you need to increase the maximum number of FDS as is being done there in the suse one you can do so by adding LimitNOFILE=4096 to the unit ( or LimitNOFILE=infinity for unlimited ) 1.https://github.com/hreinecke/multipath-tools/blob/master/multipathd/multipathd.init.redhat If you look at the RHEL6 redhat init scripts you will see the difference. I haven't post the change upstream, since it doesn't work with systemd, hence this bug. ExecStartPre doesn't help this situation. The issue is that when multipathd is stopped, it should disable queuing. When it is restarted, it shouldn't. Disabling queuing has to happen when the multipathd daemon stops, since you aren't doing anything else with it after that. I might be able to make ExecStopPost do the work. In order for that to work, ExecStopPost would need to either not be run on restarts. Or, I'd need to be able to pass to the command whether or not I'm doing a restart. |