Bug 708835

Summary: munin cron job fails to create /var/run/munin/ if it does not already exist.
Product: [Fedora] Fedora Reporter: d. johnson <drjohnson1>
Component: muninAssignee: Kevin Fenzi <kevin>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: franta, ingvar, kevin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-16 02:16:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description d. johnson 2011-05-29 19:46:11 UTC
Description of problem:

Munin cron job errors out ungracefully when munin-node is not started.

Version-Release number of selected component (if applicable):

munin-1.4.5-8.fc15.noarch
munin-common-1.4.5-8.fc15.noarch
munin-node-1.4.5-8.fc15.noarch

How reproducible:

100%

Steps to Reproduce:
1. Install munin.
2. Wait for cron job to run.
3. Check root's email.
  
Actual results:

Creating lock /var/run/munin/munin-limits.lock failed: No such file or directory
 at /usr/share/perl5/vendor_perl/Munin/Master/LimitsOld.pm line 114
Creating lock /var/run/munin/munin-graph.lock failed: No such file or directory
 at /usr/share/perl5/vendor_perl/Munin/Master/GraphOld.pm line 248
Creating lock /var/run/munin/munin-html.lock failed: No such file or directory
 at /usr/share/perl5/vendor_perl/Munin/Master/HTMLOld.pm line 151

Expected results:

No errors on fresh install.

Additional info:

This directory is created on munin-node start, but not created by munin (server / cron job).

This might be an item for /etc/tmpfiles.d/ instead.

Comment 1 d. johnson 2011-06-02 03:49:32 UTC
Upstream bug: http://munin-monitoring.org/ticket/887

munin-1.4.5-10 should resolve.

Comment 2 Frantisek Hanzlik 2011-08-28 08:27:45 UTC
I just install munin-1.4.6-1.fc15.noarch (Fedora 15 i686, SELinux active), and directory '/var/run/munin/' was not created:
# rpm -V munin
5S.T.....  c /etc/munin/munin.conf
chybí       /var/run/munin
...T.....    /var/www/html/munin/definitions.html
...T.....    /var/www/html/munin/logo-h.png
...T.....    /var/www/html/munin/logo.png
...T.....    /var/www/html/munin/style.css
(chybí==missing)

Second light defect (lazy to create extra report;): munin RPM creates directory '/etc/munin/conf.d/', but initial config file '/etc/munin/munin.conf' specify at this place other directory: "includedir /etc/munin/munin-conf.d"

Comment 3 Kevin Fenzi 2011-08-28 18:31:41 UTC
(In reply to comment #2)
> I just install munin-1.4.6-1.fc15.noarch (Fedora 15 i686, SELinux active), and
> directory '/var/run/munin/' was not created:

Have you rebooted since installing? The tmpfiles.d entry will only happen on boot. 

> Second light defect (lazy to create extra report;): munin RPM creates directory
> '/etc/munin/conf.d/', but initial config file '/etc/munin/munin.conf' specify
> at this place other directory: "includedir /etc/munin/munin-conf.d"

Fix commited, should be in next update.

Comment 4 Frantisek Hanzlik 2011-08-28 20:07:46 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I just install munin-1.4.6-1.fc15.noarch (Fedora 15 i686, SELinux active), and
> > directory '/var/run/munin/' was not created:
> 
> Have you rebooted since installing? The tmpfiles.d entry will only happen on
> boot. 
> 
> > Second light defect (lazy to create extra report;): munin RPM creates directory
> > '/etc/munin/conf.d/', but initial config file '/etc/munin/munin.conf' specify
> > at this place other directory: "includedir /etc/munin/munin-conf.d"
> 
> Fix commited, should be in next update.

No, I not did reboot.
It would be meant Linux is as windos, where reboot is needed to all.
Or we are now a step closely towards them and reboot is needed?

But seriously - I think SELinux blocked directory creation, because cpio archive contain it; and at other F15/i686 machine with SELinux disabled /var/run/munin/ is created after is munin package installed. Thus selinux rules should enable directory creation (when it is possible, i ntt know, i'm not selinux guru)

Comment 5 d. johnson 2011-08-28 21:02:39 UTC
You may have mislabeled files.  To correct them:
su -c 'restorecon -Rv /var'

See if https://admin.fedoraproject.org/updates/munin-1.4.6-4.fc15.1 resolves this for you.




-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 6 Frantisek Hanzlik 2011-08-28 22:33:23 UTC
it could be problem cause - in meantime i reboot machine, and it itself forced system relabeling at start (and systemd according to /etc/tmpfiles.d/munin.conf did create /var/run/munin/). But due to restart i'm now not able uncover problem cause.

'rpm -qa|grep munin|xargs -r rpm -e' remove nearly all from installed packages (munin, munin-common, munin-node). Nearly all - what i only found was ~35 broken symlinks in /etc/munin/plugins/, pointing to corresponding files in /usr/share/munin/plugins/ (but /usr/share/munin* was removed) - these files were probably created by munin-node-configure in munin-node postinst script.

with at koji referenced munin-1.4.6-4.fc15.1, it seems /var/run/munin/ is created OK. But "includedir /etc/munin/munin-conf.d" is still bad, and munin-node uninstall not remove /etc/munin/plugins/* symlinks.

Comment 7 Kevin Fenzi 2011-08-29 23:41:55 UTC
(In reply to comment #6)
> 'rpm -qa|grep munin|xargs -r rpm -e' remove nearly all from installed packages
> (munin, munin-common, munin-node). Nearly all - what i only found was ~35
> broken symlinks in /etc/munin/plugins/, pointing to corresponding files in
> /usr/share/munin/plugins/ (but /usr/share/munin* was removed) - these files
> were probably created by munin-node-configure in munin-node postinst script.

Please file a bug on this? 

> with at koji referenced munin-1.4.6-4.fc15.1, it seems /var/run/munin/ is
> created OK. But "includedir /etc/munin/munin-conf.d" is still bad, and
> munin-node uninstall not remove /etc/munin/plugins/* symlinks.

Yes, as noted the includedir will be fixed in the NEXT release, it's commited, but not yet pushed out. 
The other is a bug, please file it instead of posting to this closed bug and we can get it fixed? ;)