Ticket #887 (new defect)

Opened 5 months ago

$config->{rundir} not properly setup when _create_rundir_if_missing is called

Reported by: blueyed Assigned to: nobody
Priority: normal Milestone: Munin 1.4.6
Component: node Version: 1.4.3
Severity: normal Keywords:
Cc:

Description

I've installed munin locally on Lucid, and it fails after reboot with the following errors:

Creating lock /var/run/munin/munin-limits.lock failed: No such file or directory

at /usr/share/perl5/Munin/Master/LimitsOld.pm line 114

Creating lock /var/run/munin/munin-graph.lock failed: No such file or directory

at /usr/share/perl5/Munin/Master/GraphOld.pm line 248

Creating lock /var/run/munin/munin-html.lock failed: No such file or directory

at /usr/share/perl5/Munin/Master/HTMLOld.pm line 151

The problem is that when _create_rundir_if_missing is run (from /usr/share/perl5/Munin/Master/Update.pm run()), $config->{rundir} is "/tmp" and exists). Later however, $config->{rundir} gets mapped to $MUNIN_STATEDIR - which is /var/run/munin.

Normally, this bug gets worked around when munin-node is running on the same node, too - since the start script (upstart in Ubuntu) creates /var/run/munin.

The real bug appears to be that $config isn't properly setup when _create_rundir_if_missing is run.

Initially reported at https://bugs.launchpad.net/ubuntu/+source/munin/+bug/538587