-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPM services fail after reboot on any system where /run is based on tmpfs #609
Comments
Thanks for detailed report. SystemD is still somewhat experimental so we really appreciate sharing your solutions here. This sounds similar to #610 your solution looks solid to me. We have something similar for systemv/debian. A pull request would be awesome :) |
I can make a pull request. It may take a day or two, but shouldn't be a big deal. I just corrected my post above to add missing $ for ${{app_name}} -- silly typo on my part. |
I updated my post above to add detail on the possible /etc/tmpfiles.d/ solution, which may help out with the Debian version. (I'm assuming they use tmpfiles.d?) We tested that solution and it worked perfectly. But it meant adding another file to our solution instead of making small changes to a file we already had. |
Pull request created -- #611 -- I don't know how to link it to this issue. |
We have a service using systemd for its service in an RPM. Everything works. However, when you reboot the server, since /run (and thus /var/run) is based on tmpfs, the service's pid folder is gone on reboot. Thus, the service won't start. We have run into this on CentOS 7, which does not have the latest systemd. Therefore, the convenient solution of using
in the systemd start template is not available. Another option is creating a file in
/etc/tmpfiles.d/
that will auto-create the /run folder on every reboot. For example, if you create the file/etc/tmpfiles.d/${{app_name}}
that contains just the one line:We opted to add the following lines to the systemd start template:
The text was updated successfully, but these errors were encountered: