Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 276378 - Mongrel Cluster init.d script does not clear pids on startup
Summary: Mongrel Cluster init.d script does not clear pids on startup
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-03 15:38 UTC by Robert Sharp
Modified: 2012-04-30 06:53 UTC (History)
0 users

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


Attachments
run script for mongrel clusters (mongrel_cluster,684 bytes, text/plain)
2010-08-09 07:23 UTC, Robert Sharp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Sharp 2009-07-03 15:38:02 UTC
running /etc/init.d/mongrel_cluster start does not clear a previously generated pid. It appears to assume that all pids are in /var/run/mongrel_cluster and forces a mkdir on start. However, configure files in /etc/mongrel_cluster contain an address to the pid file, which is often different (especially on Rails). 

Reproducible: Always

Steps to Reproduce:
1.Create cluster configuration file with mongrel_rails and link to /etc/mongrel_cluster.
2. Start mongrel_cluster with /etc/init.d/
3. Stop and then restart. Mongrel fails to start because of existing pids

Actual Results:  
Mongrel fails

Expected Results:  
Mongrel starts as expected

By adding the option "--clean" to the mongrel_cluster_ctl call in the "start" action of the init.d script, the problem is fixed. Could also be added to "stop"?
Comment 1 Hans de Graaff gentoo-dev Security 2010-08-08 12:46:00 UTC
I've just had a (very late) look at this bug. Unfortunately I need more information to be able to solve it, since I can't follow you reproduction steps.

Please try to be more explicit on what these steps are, specifically what command line options to take.

Given that we don't ship an init.d file ourselves I expect this to be an upstream problem, but I can't be certain without understanding what is going on here.
Comment 2 Robert Sharp 2010-08-09 07:23:52 UTC
Created attachment 241925 [details]
run script for mongrel clusters
Comment 3 Robert Sharp 2010-08-09 07:25:19 UTC
Comment on attachment 241925 [details]
run script for mongrel clusters

It was a long time ago, so long I have forgotten the details. I co recall getting a run script from somewhere and it gave me no end of problems. Attached is the one I have written and it seems to do the job.
Comment 4 Hans de Graaff gentoo-dev Security 2012-04-30 06:53:41 UTC
I just added this init.d script to the mongrel_cluster ebuild. Apologies for the huge delays here, but I guess the confusion was that it seemed this script was already around while we should have been treating it as a new addition.