Bug 221000

Summary: sysutils/munin-node: munin-asyncd service hangs on start
Product: Ports & Packages Reporter: Marcel Bischoff <marcel>
Component: Individual Port(s)Assignee: Mathieu Arnold <mat>
Status: Closed FIXED    
Severity: Affects Some People CC: mat
Priority: Normal Keywords: needs-qa
Version: LatestFlags: koobs: maintainer-feedback? (mat)
koobs: merge-quarterly?
Hardware: amd64   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221203
Attachments:
Description Flags
Changes to munin-asyncd rc file none

Description Marcel Bischoff 2017-07-25 11:27:56 UTC
Created attachment 184696 [details]
Changes to munin-asyncd rc file

The current rc file does not correctly start up munin-asyncd, hanging when invoked. This can lead to machines getting stuck on startup, as has happened to me, preventing even SSH from starting up. This effectively renders the machine useless and it must be booted with a rescue system.

I have attached a diff that resolved this issue, also adding a (missing) stop action.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2017-07-26 03:02:18 UTC
Assign to maintainer (initial summary missing category was not auto-assigned)
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2017-07-28 07:41:44 UTC
This seems very strange, I do not think the patch is right.
Comment 3 Marcel Bischoff 2017-07-28 13:53:19 UTC
Well, I have tested it on 4 completely different FreeBSD machines and all of them exhibited the same problem. Just today I had to service a machine that rebooted due to a power failure and hung at boot exactly at the start of the munin-asyncd service. Changing the rc file to my diff resolved this issue.
Comment 4 Mathieu Arnold freebsd_committer freebsd_triage 2017-08-03 13:33:02 UTC
I was right, the patch did not seem right, but asyncd using setproctitle messes the hell out of rc.subr.
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-08-03 13:35:18 UTC
A commit references this bug:

Author: mat
Date: Thu Aug  3 13:34:58 UTC 2017
New revision: 447210
URL: https://svnweb.freebsd.org/changeset/ports/447210

Log:
  Fix starting and stopping munin-asyncd. [1]

  Turns out creating a start_cmd function is not enough, you have to add a
  variable, start_cmd and point it to the start_cmd function.
  As for stopping it, it should work out of the box, but for the fact that
  munin-asyncd uses setproctitle or something, and it confuses the hell
  out of rc.subr.

  While there, pet rclint.

  PR:		221000 [1] (based on)
  Submitted by:	marcel herrbischoff com
  Sponsored by:	Absolight

Changes:
  head/sysutils/munin-node/Makefile
  head/sysutils/munin-node/files/munin-asyncd.in
  head/sysutils/munin-node/files/munin-node.in
  head/sysutils/munin-node/files/munin-sched.in