Bug 170980 - sysutils/mcollective: startup script bug
Summary: sysutils/mcollective: startup script bug
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: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-24 08:10 UTC by Nicolas Szalay
Modified: 2012-08-30 04:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Szalay 2012-08-24 08:10:03 UTC
When using freebsd 9 & mcollective 2.1, the startup script does not evaluate correctly the status of the daemon :

[eqx-admin1:~] sudo /usr/local/etc/rc.d/mcollectived start 
Starting mcollectived.
[eqx-admin1:~] sudo /usr/local/etc/rc.d/mcollectived status
mcollectived is not running.

when checking pid file, and pid list (and functionality of the daemon), it's OK.

I think it's due to the procname directive in the rc.d script. It is set to "ruby", while process list shows :

root        305   0.0  0.0 215936  19292  ??  S     6:48AM     0:00.51 /usr/local/bin/ruby19 /usr/local/sbin/mcollectived .....

setting procname to "/usr/local/bin/ruby19" makes it happy.

When running a config management tool like chef, it spawns hundreds of process and crashes the machine.

How-To-Repeat: launch rc.d script
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-08-25 19:36:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->swills

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2012-08-30 04:08:27 UTC
Author: swills
Date: Thu Aug 30 03:08:13 2012
New Revision: 303359
URL: http://svn.freebsd.org/changeset/ports/303359

Log:
  - Fix rc script status and restart/shutdown
  
  PR:		ports/170980
  Reported by:	Nicolas Szalay <nicolas.szalay@fotolia.com>

Modified:
  head/sysutils/mcollective/Makefile   (contents, props changed)
  head/sysutils/mcollective/files/mcollectived.in   (contents, props changed)

Modified: head/sysutils/mcollective/Makefile
==============================================================================
--- head/sysutils/mcollective/Makefile	Thu Aug 30 02:18:32 2012	(r303358)
+++ head/sysutils/mcollective/Makefile	Thu Aug 30 03:08:13 2012	(r303359)
@@ -7,7 +7,7 @@
 
 PORTNAME=	mcollective
 PORTVERSION=	2.1.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	sysutils
 MASTER_SITES=	http://downloads.puppetlabs.com/${PORTNAME}/
 EXTRACT_SUFX=	.tgz
@@ -28,6 +28,8 @@ REINPLACE_ARGS=	-i ""
 
 SCRIPTS=	mco mc-call-agent
 
+SUB_LIST+=	RUBY=${RUBY}
+
 do-patch:
 	@${REINPLACE_CMD} -e "s|/etc/mcollective|${ETCDIR}|" \
 	    ${WRKSRC}/bin/mcollectived \

Modified: head/sysutils/mcollective/files/mcollectived.in
==============================================================================
--- head/sysutils/mcollective/files/mcollectived.in	Thu Aug 30 02:18:32 2012	(r303358)
+++ head/sysutils/mcollective/files/mcollectived.in	Thu Aug 30 03:08:13 2012	(r303359)
@@ -25,6 +25,6 @@ load_rc_config "${name}"
 pidfile="/var/run/${name}.pid"
 command="%%PREFIX%%/sbin/${name}"
 command_args="-p $pidfile"
-procname="ruby"
+command_interpreter=%%RUBY%%
 
 run_rc_command "$1"
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Steve Wills freebsd_committer freebsd_triage 2012-08-30 04:08:32 UTC
State Changed
From-To: open->closed

Fixed, thanks!