Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 333275 - sys-cluster/ganglia: no pidfile created for gmond
Summary: sys-cluster/ganglia: no pidfile created for gmond
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Justin Bronder (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-18 06:14 UTC by Joshua Rich
Modified: 2010-08-29 01:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for gmond init script (gmond-initd.patch,368 bytes, patch)
2010-08-18 06:16 UTC, Joshua Rich
Details | Diff
use pidfile when stopping gmond (gmond-initd.patch,581 bytes, patch)
2010-08-18 06:20 UTC, Joshua Rich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Rich 2010-08-18 06:14:26 UTC
It appears that the init script for gmond in sys-cluster/ganglia results in gmond starting without creating a pidfile. The attached small patch fixes the problem.

Thanks,

Josh

Reproducible: Always
Comment 1 Joshua Rich 2010-08-18 06:16:05 UTC
Created attachment 243411 [details, diff]
patch for gmond init script
Comment 2 Joshua Rich 2010-08-18 06:20:12 UTC
Created attachment 243413 [details, diff]
use pidfile when stopping gmond
Comment 3 Justin Bronder (RETIRED) gentoo-dev 2010-08-20 19:10:18 UTC
Any reason we shouldn't use the built-in --pid-file for both gmond and gmetad?

Thanks for reporting.
Comment 4 Joshua Rich 2010-08-24 01:31:50 UTC
(In reply to comment #3)
> Any reason we shouldn't use the built-in --pid-file for both gmond and gmetad?
> 
> Thanks for reporting.
> 

The only way I can get a PID file that reflects the actual PID of the running gmond process, using start-stop-daemon --pidfile creation is with the following start() function:


start() {
	ebegin "Starting GANGLIA gmond: "
	start-stop-daemon --start --quiet --background \
	    --pidfile /var/run/gmond.pid --make-pidfile \
	    --exec /usr/sbin/gmond -- --foreground
	eend $? "Failed to start gmond"
}

That is more complicated than the attached patch, though I could be doing something wrong?

Regards,

Josh
Comment 5 Justin Bronder (RETIRED) gentoo-dev 2010-08-25 01:55:31 UTC
My apologies for confusing you, I looked at your first patch too quickly, then suggested that you do exactly what it already did.

Thanks for reporting,


  25 Aug 2010; Justin Bronder <jsbronder@gentoo.org> +files/gmetad.rc-2,
  +files/gmond.rc-2, -ganglia-3.1.7-r1.ebuild, +ganglia-3.1.7-r2.ebuild:
  Use pidfile for starting and stopping the ganglia daemons. Thanks to
  Joshua Rich, #333275
Comment 6 Joshua Rich 2010-08-29 01:04:38 UTC
(In reply to comment #5)
> My apologies for confusing you, I looked at your first patch too quickly, then
> suggested that you do exactly what it already did.
> 
> Thanks for reporting,
> 
> 
>   25 Aug 2010; Justin Bronder <jsbronder@gentoo.org> +files/gmetad.rc-2,
>   +files/gmond.rc-2, -ganglia-3.1.7-r1.ebuild, +ganglia-3.1.7-r2.ebuild:
>   Use pidfile for starting and stopping the ganglia daemons. Thanks to
>   Joshua Rich, #333275
> 

Thanks Justin.

Regards,

Josh