From nobody@FreeBSD.org  Sat Oct 30 21:35:05 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 37A311065672
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Oct 2010 21:35:05 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 1F2A68FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Oct 2010 21:35:05 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o9ULZ4am072573
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 30 Oct 2010 21:35:04 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o9ULZ3Rs072572;
	Sat, 30 Oct 2010 21:35:03 GMT
	(envelope-from nobody)
Message-Id: <201010302135.o9ULZ3Rs072572@www.freebsd.org>
Date: Sat, 30 Oct 2010 21:35:03 GMT
From: Toomas Aas <toomas@tarkvarastuudio.ee>
To: freebsd-gnats-submit@FreeBSD.org
Subject: www/ruby-cruisecontrolrb rc.d script doesn't clean up on stop
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         151840
>Category:       ports
>Synopsis:       www/ruby-cruisecontrolrb rc.d script doesn't clean up on stop
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pgollucci
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 30 21:40:11 UTC 2010
>Closed-Date:    Thu Nov 11 03:34:59 UTC 2010
>Last-Modified:  Thu Nov 11 03:40:08 UTC 2010
>Originator:     Toomas Aas
>Release:        8.1-RELEASE-p1
>Organization:
>Environment:
FreeBSD builder.tarkvarastuudio.ee 8.1-RELEASE-p1 FreeBSD 8.1-RELEASE-p1 #1: Tue Sep 21 23:49:01 EEST 2010     toomas@builder.tarkvarastuudio.ee:/usr/obj/usr/src/sys/TVS8  amd64
>Description:
The script /usr/local/etc/rc.d/cruisecontrolrb doesn't shut down builder processes when run with the 'stop' argument. Since the PID files of the builders are also left behind, this means that cruisecontrol.rb will not start automatically on server reboot.
>How-To-Repeat:
Configure some projects in cruisecontrol.rb

Start the dashboard and builders:
/usr/local/etc/rc.d/cruisecontrolrb start

Now run:
/usr/local/etc/rc.d/cruisecontrolrb stop

And then again:
/usr/local/etc/rc.d/cruisecontrolrb start

Notice that cruisecontrol.rb was not started.
>Fix:
Attached is a patch to the rc.d script, which terminates the builders and removes their PID files when run with the 'stop' argument.

Patch attached with submission follows:

a30 7
    cd %%PREFIX%%/www/${name}/tmp/pids/builders/
    for builder in `ls` 
    do {
        kill $(cat $builder)
        rm ${builder}
    }
    done 


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ruby 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Oct 30 21:40:17 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151840 
Responsible-Changed-From-To: ruby->pgollucci 
Responsible-Changed-By: pgollucci 
Responsible-Changed-When: Thu Nov 11 02:32:28 UTC 2010 
Responsible-Changed-Why:  
I will take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151840 
State-Changed-From-To: open->closed 
State-Changed-By: pgollucci 
State-Changed-When: Thu Nov 11 03:34:57 UTC 2010 
State-Changed-Why:  
Committed, Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151840 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/151840: commit references a PR
Date: Thu, 11 Nov 2010 03:34:53 +0000 (UTC)

 pgollucci    2010-11-11 03:34:47 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www/ruby-cruisecontrolrb/files cruisecontrolrb.in 
   Log:
   - Correctly stop both mongrel, and the builder instances which may be
     several different pids.
   
   PR:             ports/151840
   Submitted by:   Toomas Aas <toomas@tarkvarastuudio.ee>
   Sponsored by:   RideCharge Inc. / TaxiMagic
   
   Revision  Changes    Path
   1.5       +7 -1      ports/www/ruby-cruisecontrolrb/files/cruisecontrolrb.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
