Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 218331

Summary: sci-biology/foldingathome init scripts stop working after openrc migration
Product: Gentoo Linux Reporter: Eric Chatellier <eric.chatellier>
Component: New packagesAssignee: Gentoo Science Biology related packages <sci-biology>
Status: VERIFIED LATER    
Severity: minor CC: const, radab
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: init script for 6.02

Description Eric Chatellier 2008-04-18 21:03:01 UTC
Since openrc migration foldingathome can't start more than one process

On a dual-core, run first, and fail.

Reproducible: Always

Steps to Reproduce:
1. Update to openrc
2. run /etc/init.f/foldingathome start

Actual Results:  
$ /etc/init.d/foldingathome start
foldingathome     | * Caching service dependencies ...                                                                                                                                                                                 [ ok ]
foldingathome     | * Starting Folding@Home on CPU 2 ...
foldingathome     | * start-stop-daemon: ./foldingathome is already running                                                                                                                                                            [ !! ]
foldingathome     | * Starting Folding@Home on CPU 1 ...
foldingathome     | * start-stop-daemon: ./foldingathome is already running                                                                                                                                                            [ !! ]



On amd64 with =sci-biology/foldingathome-5.0.2-r5
Comment 1 Rada 2008-04-22 00:05:23 UTC
I was able to hack around to make it start.  Quick and dirty but it works.

In /etc/init.d/foldingathome, add  --pidfile ${PIDFILE} to line 35 before --exec, after start-stop-daemon.  Even with this variable undefined, it starts just fine.  Complains upon stopping, but stops fine thanks to the extra kills in the init script.
Comment 2 Rada 2008-04-22 01:13:38 UTC
if you want it to start up quicker though, add something like

PIDFILE=/var/run/folding

to /etc/conf.d/foldingathome.  This is just a place holder and no files actually go anywhere.
Comment 3 Eric Chatellier 2008-04-22 20:52:53 UTC
Nice :)

Works fine
Comment 4 Jeffrey Gardner (RETIRED) gentoo-dev 2008-08-03 17:38:11 UTC
I was able to incorporate some fixes in the latest (6.02) but it's still not 100% clean.

foldingathome     | * Caching service dependencies                      [ ok ]
foldingathome     | * Stopping Folding@Home ...
foldingathome     | * Will stop processes owned by UID 104
foldingathome     | * Will stop processes of `/opt/foldingathome/amd64-smp/fah6'
foldingathome     | * start-stop-daemon: no matching processes found    

start/stop works fine, but the error msg is annoying. I may have to talk to uberlord to find the correct solution.
Comment 5 Constantin Baranov 2008-11-16 17:25:29 UTC
Created attachment 172001 [details]
init script for 6.02

Use pidfile as key when stopping.
Solves problem described in comment #4.

Tricks with ps/grep/kill replaced with single killall.
Comment 6 Constantin Baranov 2009-03-03 09:45:29 UTC
I believe this should be FIXED as init script was updated in the tree.