Bug 7569 - munin-node fails to start due to missing /run/munin
Summary: munin-node fails to start due to missing /run/munin
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Guillaume Rousse
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2012-09-25 15:32 CEST by Barry Jackson
Modified: 2012-10-02 23:39 CEST (History)
1 user (show)

See Also:
Source RPM: munin-2.0.6-1.mga3.src.rpm
CVE:
Status comment:


Attachments
Proposed patch (575 bytes, patch)
2012-09-26 00:27 CEST, Barry Jackson
Details | Diff
Proposed patch (583 bytes, patch)
2012-09-26 20:46 CEST, Barry Jackson
Details | Diff

Description Barry Jackson 2012-09-25 15:32:27 CEST
Description of problem:
[root@zmhost baz]# systemctl restart munin-node.service
Job failed. See system journal and 'systemctl status' for details.
Version-Release number of selected component (if applicable):

From munin-node log:-
Process Backgrounded
2012/09/25-14:17:50 Couldn't open pid file "/var/run/munin/munin-node.pid" [No such file or directory].

So:

[root@zmhost baz]# md /run/munin
[root@zmhost baz]# systemctl restart munin-node.service
[root@zmhost baz]# systemctl status munin-node.service
munin-node.service - Munin Node Server.
          Loaded: loaded (/usr/lib/systemd/system/munin-node.service; enabled)
          Active: active (running) since Tue, 25 Sep 2012 14:19:45 +0100; 7s ago
            Docs: man:munin-node
         Process: 8014 ExecStart=/usr/sbin/munin-node (code=exited, status=0/SUCCESS)
        Main PID: 8015 (munin-node)
          CGroup: name=systemd:/system/munin-node.service
                  รข 8015 munin-node


How reproducible:


Steps to Reproduce:
1. Install munin-node on server and try to start it after configuring.
2.
3.
Barry Jackson 2012-09-25 15:36:08 CEST

Status: NEW => ASSIGNED
Assignee: bugsquad => guillomovitch

Comment 1 Barry Jackson 2012-09-25 16:32:19 CEST
Set to assigned in error.

Status: ASSIGNED => NEW

Comment 2 Sander Lepik 2012-09-25 18:30:24 CEST
Will it work if you rename /usr/lib/tmpfiles.d/munin.conf -> /usr/lib/tmpfiles.d/munin-node.conf and reboot? Tho' i'm not 100% sure if munin itself needs this directory or not.

Keywords: (none) => NEEDINFO
CC: (none) => sander.lepik

Comment 3 Barry Jackson 2012-09-26 00:27:53 CEST
Created attachment 2857 [details]
Proposed patch

After discussion with Sander and Colin I have tested this patch and it fixes this bug.
Comment 4 Sander Lepik 2012-09-26 09:08:53 CEST
One more thing i noticed.

Is this section needed?

%pre node
%_pre_useradd %{name} %{_localstatedir}/lib/%{name} /bin/false

munin-node requires common package that already adds user in its %pre.
Comment 5 Barry Jackson 2012-09-26 14:20:45 CEST
It would seem not. I will do some testing with it removed ;)
Comment 6 Barry Jackson 2012-09-26 20:46:16 CEST
Created attachment 2865 [details]
Proposed patch

Updated patch.

Attachment 2857 is obsolete: 0 => 1

Comment 7 Guillaume Rousse 2012-10-02 20:12:11 CEST
The munin-node specific %pre section is indeed useless, but that's a secondary issue.

That's a generic problem with tmpfiles configuration files that they are not honored immediatly at package installation time. I'd rather use a generic solution, such as a rpm file trigger, rather than a hack in munin package.
Comment 8 Sander Lepik 2012-10-02 20:32:33 CEST
Hack? What makes it a hack?
Comment 9 Guillaume Rousse 2012-10-02 23:22:04 CEST
It is a local workaround, not a generic solution to the problem.
Comment 10 Sander Lepik 2012-10-02 23:24:33 CEST
This is not a local workaround, this is what Colin suggested on IRC and this is how systemd works with tmpfiles.

I fail to see it as a hack :/
Comment 11 Guillaume Rousse 2012-10-02 23:39:10 CEST
Any package relying on systemd-tpmfiles to create directories under tmpfs filesystems has exactly the same concern, munin has nothing special here. Hence the need for a general solution, such as a rpm filetrigger.

I just commited systemd-193-2.mga3, fixing this issue.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.