Bug 221000 - sysutils/munin-node: munin-asyncd service hangs on start
Summary: sysutils/munin-node: munin-asyncd service hangs on start
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: Normal Affects Some People
Assignee: Mathieu Arnold
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2017-07-25 11:27 UTC by Marcel Bischoff
Modified: 2017-08-03 14:44 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback? (mat)
koobs: merge-quarterly?


Attachments
Changes to munin-asyncd rc file (919 bytes, patch)
2017-07-25 11:27 UTC, Marcel Bischoff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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