Skip to content
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

munge service doesn't work after fresh RPM install prior to reboot #39

Closed
magicite opened this issue May 27, 2015 · 2 comments
Closed

Comments

@magicite
Copy link

I built and installed munge for SLES12 using the spec file. The install went fine, but when I went to start the service (prior to reboot) it failed due to:

purge-head12:~ # journalctl -xn | tail
May 27 14:37:46 datawarp-head12 munged[29102]: munged: Error: Failed to check
pidfile dir "/var/run/munge": cannot canonicalize "/var/run/munge": No such
file or directory

I believe this is a result of not doing the following (from https://en.opensuse.org/openSUSE:Systemd_packaging_guidelines ):

If you expect this file / directory to be available after package installation
(and before reboot), remember to add in your package %post :

systemd-tmpfiles --create /usr/lib/tmpfiles.d/<file_name>

@dun dun added the bug label Jun 4, 2015
@dun dun added this to the 0.5.12 milestone Jun 4, 2015
dun added a commit that referenced this issue Dec 22, 2015
RPM specfile support for non-RedHat systems is being dropped since
it has become a maintenance burden to maintain multiple distros
in the same specfile, especially with the transition to systemd.
Packaging details like this are best handled downstream.

The specfile will target the latest CentOS release.  RPM specfiles for
other distros & releases will be placed in a contrib subdir if needed.

Signed-off-by: Chris Dunlap <[email protected]>
Issue #27
Issue #36
Issue #39
dun added a commit that referenced this issue Dec 22, 2015
This commit coverts the RPM specfile from sysvinit to systemd.
The requisite Requires & BuildRequires tags for systemd are added.
References to chkconfig and the sysvinit script are replaced with
corresponding helper macros to handle systemd scriptlet operations.
The sysvinit script and sysconfig file are replaced with the systemd
unit file and tmpfiles.d configuration file.

Furthermore, the %ghost tag is removed from the /var/run/munge
directory.  This tag was added back in commit 0f89429, at which
point the sysvinit script created this directory when the service
was started.  By removing the %ghost tag, this directory will be
created when the rpm is installed.  Since /var/run is (likely)
mounted as tmpfs, this directory will disappear on the next reboot,
at which point it will be re-created by tmpfiles.d.

The RuntimeDirectory and RuntimeDirectoryMode options in the service
file were added in systemd 211.  This is a clean and straightforward
manner in which to create private runtime directories below /run.
However, tmpfiles.d is being used instead since CentOS 7 ships with
systemd 208.

References:
- https://fedoraproject.org/wiki/Packaging:Systemd
- https://fedoraproject.org/wiki/Packaging:ScriptletSnippets
- https://fedoraproject.org/wiki/Packaging:Tmpfiles.d

Tested on:
- CentOS 7
- Fedora 20-23

Signed-off-by: Chris Dunlap <[email protected]>
Closes #33
Closes #43
Issue #27
Issue #36
Issue #39
@dun dun added packaging and removed bug labels Feb 25, 2016
@dun dun removed this from the 0.5.12 milestone Feb 25, 2016
@dun
Copy link
Owner

dun commented Feb 25, 2016

The top-level munge.spec will target the latest CentOS / RHEL release. RPM specfiles for other distros & releases will be placed in the top-level extra directory -- please submit a pull request.

@dun
Copy link
Owner

dun commented Jan 15, 2020

Closing out old issue.

@dun dun closed this as completed Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants