Bug 155109 - sysutils/munin-node looses $PATH after SIGHUP
Summary: sysutils/munin-node looses $PATH after SIGHUP
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Florian Smeets
Depends on:
Reported: 2011-02-28 01:20 UTC by claudius
Modified: 2011-03-09 23:50 UTC (History)
0 users

See Also:

file.diff (6.14 KB, patch)
2011-02-28 01:20 UTC, claudius
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description claudius 2011-02-28 01:20:08 UTC
newsyslog sends SIGHUP to /var/run/munin/munin-node.pid after rotating log files, this causes munin-node to loose $PATH and some plugins stop working as expected.
(ntp_kernel_err, ntp_kernel_pll_freq, ntp_kernel_pll_off, postfix_mailqueue, coretemp and dev_cpu_). I didn't checked all plugins, so maybe there are more affected by this problem.

Fix: the attached diff adds absolute paths to mentioned plugins as a workaround, maybe there is a better way to fix the $PATH issue?

Patch attached with submission follows:
How-To-Repeat: kill -HUP `cat /var/run/munin/munin-node.pid`
and check /var/log/munin-node.log for errors
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-02-28 01:20:57 UTC
Responsible Changed
From-To: freebsd-bugs->des

Make this a ports PR and assign.
Comment 2 Florian Smeets freebsd_committer 2011-02-28 08:01:34 UTC
Responsible Changed
From-To: des->flo

I'll take care of this PR.
Comment 3 dfilter service freebsd_committer 2011-03-09 23:40:22 UTC
flo         2011-03-09 23:40:14 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/munin-node  Makefile 
  Added files:
    sysutils/munin-node/files patch-node__sbin__munin-node 
  - fix a bug where plugins would stop graping data after a SIGHUP to munin-node
  - prevent leftovers from sed and patch otherwise these would be installed also
   The problem is that munin-nodes runs in perl taint mode and after a SIGHUP
   p5-Net-Server thinks that the path is tainted and unsets the complete path,
   this causes all plugins which do not use an absolute path to utilities they
   call to fail. The fix is to set a well known good path.
  Obtained from:  OpenBSD
  PR:             ports/155109
  Revision  Changes    Path
  1.41      +9 -1      ports/sysutils/munin-node/Makefile
  1.1       +12 -0     ports/sysutils/munin-node/files/patch-node__sbin__munin-node (new)
  1.1       +13 -0     ports/sysutils/munin-node/files/patch-node__sbin__munin-node-configure (new)
  1.1       +12 -0     ports/sysutils/munin-node/files/patch-node__sbin__munin-run (new)
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Florian Smeets freebsd_committer 2011-03-09 23:42:04 UTC
State Changed
From-To: open->closed

I added a patch which should fix all plugins