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

Bug 357933

Summary: dev-util/buildbot-slave-0.8.3 init-script issues
Product: Gentoo Linux Reporter: Johan Bergström <bugs>
Component: New packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: init-debug.log

Description Johan Bergström 2011-03-08 15:05:41 UTC
The init script bundled with buildbot has problems starting up:

s.nu /home/jbergstroem # /etc/init.d/buildslave start
 * Starting buildslave in /var/lib/build/node ...                        [ !! ]
zsh: exit 1     /etc/init.d/buildslave start

The issue being start-stop-daemon trying to run pidof /usr/bin/python (which returns nothing) when it "should run" piof /usr/bin/python2.6 (in my case). Perhaps we should tell start-stop-daemon where the pidfile resides?
Comment 1 Johan Bergström 2011-03-08 15:07:41 UTC
Guess I should also note that the script itself has no issues actually starting, it's just start-stop-daemon that has a hard time.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2011-05-04 21:47:39 UTC
Can you confirm this is still an issue for you? It appears to have been taken care of in the tree.
Comment 3 Johan Bergström 2011-05-04 21:51:16 UTC
Sorry to say that it still fails:

s.nu /etc # eix -cs buildbot-slave
[I] dev-util/buildbot-slave (0.8.3@05/04/2011): BuildBot Slave Daemon
s.nu /etc # /etc/init.d/buildslave start
 * Starting buildslave in /var/lib/build/node ...                                                                             [ !! ]
# ps aux | grep buildslave
buildbot 17958  0.0  1.1  25536  9096 ?        Sl   23:49   0:00 /usr/bin/python2.7 /usr/bin/twistd --no_save --logfile=/var/lib/build/node/twistd.log --pidfile=/var/lib/build/node/buildslave.pid --python=/var/lib/build/node/buildbot.tac

Guess I should be a good gentoo user and upgrade to baselayout-2. I'll report back after
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2011-05-04 22:37:11 UTC
Ah I see what you mean now. You are correct, it appears to be the way we call python.
Comment 5 Doug Goldstein (RETIRED) gentoo-dev 2011-05-04 22:42:10 UTC
Try this and let me know if it works...

--env HOME=${BASEDIR}" \
--pidfile="${BASEDIR}/buildslave.pid" \
--exec /usr/bin/twistd -- \
--no_save \

Keep the other lines the same. Basically change the command that is being executed to twistd and add the --pidfile to start-stop-daemon
Comment 6 Johan Bergström 2011-05-05 07:00:06 UTC
Created attachment 272155 [details]
init-debug.log

Unfortunately, the patched init-script didn't work. Attaching the debug output of patched --start.

Thanks
Comment 7 Johan Bergström 2011-05-05 07:02:22 UTC
(In reply to comment #6)
> Created attachment 272155 [details]
> init-debug.log
> 
> Unfortunately, the patched init-script didn't work. Attaching the debug output
> of patched --start.
> 
> Thanks

Took a brief look at it, and by re-adding --pidfile to twisted as well, we have a working script. Here's the "whole" ordeal:

start-stop-daemon --start -c "${USERNAME}" \
	--env HOME="${BASEDIR}" \
	--pidfile="${BASEDIR}/buildslave.pid" \
	--exec /usr/bin/twistd -- \
	--no_save \
	--pidfile="${BASEDIR}/buildslave.pid" \
	--logfile="${BASEDIR}/twistd.log" \
	--python="${BASEDIR}/buildbot.tac"
eend $?

This most likely applies to buildbot as well (master)
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2011-05-06 20:45:56 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Created attachment 272155 [details]
> > init-debug.log
> > 
> > Unfortunately, the patched init-script didn't work. Attaching the debug output
> > of patched --start.
> > 
> > Thanks
> 
> Took a brief look at it, and by re-adding --pidfile to twisted as well, we have
> a working script. Here's the "whole" ordeal:
> 
> start-stop-daemon --start -c "${USERNAME}" \
>     --env HOME="${BASEDIR}" \
>     --pidfile="${BASEDIR}/buildslave.pid" \
>     --exec /usr/bin/twistd -- \
>     --no_save \
>     --pidfile="${BASEDIR}/buildslave.pid" \
>     --logfile="${BASEDIR}/twistd.log" \
>     --python="${BASEDIR}/buildbot.tac"
> eend $?
> 
> This most likely applies to buildbot as well (master)

Yep. This is what I had intended you set it to. You need to provide the pidfile to both twisted and start-stop-daemon
Comment 9 Dirkjan Ochtman (RETIRED) gentoo-dev 2011-12-26 10:10:28 UTC
So do we need it on both s-s-d and twistd, or will just the latter suffice?
Comment 10 Dustin J. Mitchell 2012-06-23 23:07:24 UTC
(In reply to comment #9)
> So do we need it on both s-s-d and twistd, or will just the latter suffice?

According to comment 8, both.
Comment 11 Johan Bergström 2012-09-12 22:37:07 UTC
I haven't seen this happen in a while now. Can't say if there's been an upstream change or not, but our init scripts seems similar to what they were before. Close? Add it anyway?
Comment 12 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-09-30 17:28:59 UTC
I took the fix from bug 397759, which I think was basically a duplicate? Closing this for now, feel free to reopen if there are still issues.

*** This bug has been marked as a duplicate of bug 397759 ***