Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262046 - net-p2p/rtorrent: rtorrentd should be started AFTER slapd (net-nds/openldap)
Summary: net-p2p/rtorrent: rtorrentd should be started AFTER slapd (net-nds/openldap)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Peter Alfredsen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-10 21:24 UTC by Chris Paras
Modified: 2009-08-25 23:14 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Paras 2009-03-10 21:24:53 UTC
/etc/init.d/rtorrentd couldn't start during bootup because the user specified in /etc/conf.d/rtorrentd isn't known yet. Reason is the user isn't known because the specified user is an user made available through an LDAP Database. Because rtorrentd is started BEFORE slapd, this problem exists.

Reproducible: Always

Steps to Reproduce:
set up an LDAP Central Authentication Server and populate it with users

1. edit /etc/conf.d/rtorrentd and choose an user ONLY present in LDAP Database (not in /etc/passwd or /etc/shadow)
2. add rtorrentd to default runlevel (rc-update add rtorrentd default)
3. reboot machine



Actual Results:  
rtorrentd couldn't find the user to run as

Expected Results:  
rtorrent should run as the specified user

I'm not sure, but i think a simple "after LDAP" in the /etc/init.d/rtorrentd file could fix this.
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-03-11 05:33:16 UTC
Reassigning to/CCing maintainers.
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-03-25 23:49:40 UTC
(In reply to comment #0)

> I'm not sure, but i think a simple "after LDAP" in the /etc/init.d/rtorrentd
> file could fix this.

I don't have access to any such ldap setups. Please test and report back. 

Comment 3 Timothy Redaelli (RETIRED) gentoo-dev 2009-03-26 08:11:01 UTC
I think it's better to change the use line to "use ypbind slapd net"
To allow also nis users
Comment 4 Chris Paras 2009-03-26 11:29:46 UTC
(In reply to comment #3)
> I think it's better to change the use line to "use ypbind slapd net"
> To allow also nis users
> 

ok, after changing the line

use net.*

to

use ypbind slapd net

i rebooted the machine and rtorrent was running fine in a screen session. So I guess this issue is fixed. I did not test the NIS stuff because i am not running NIS.

However, another issue appeared:


To stop rtorrentd i had to enter /etc/init.d/rtorrentd stop twice.

The output from the first try :

 * Stopping rtorrent ...                                                  [ !! ]

Second try:

 * Stopping rtorrent ...                                                  [ ok ]

I tried and switched to the screen session running rtorrent and tried /etc/init.d/rtorrentd stop (the first try) , and the rtorrent session was properly shutdown (it takes a couple of seconds to disannounce to the trackers) and the screen session closed. Why do i have to stop it twice ?

Comment 5 Chris Paras 2009-03-31 11:57:27 UTC
I think adding some kind of waiting time or PID check might help if I'm correct...

(In reply to comment #4)
> (In reply to comment #3)
> > I think it's better to change the use line to "use ypbind slapd net"
> > To allow also nis users
> > 
> 
> ok, after changing the line
> 
> use net.*
> 
> to
> 
> use ypbind slapd net
> 
> i rebooted the machine and rtorrent was running fine in a screen session. So I
> guess this issue is fixed. I did not test the NIS stuff because i am not
> running NIS.
> 
> However, another issue appeared:
> 
> 
> To stop rtorrentd i had to enter /etc/init.d/rtorrentd stop twice.
> 
> The output from the first try :
> 
>  * Stopping rtorrent ...                                                  [ !!
> ]
> 
> Second try:
> 
>  * Stopping rtorrent ...                                                  [ ok
> ]
> 
> I tried and switched to the screen session running rtorrent and tried
> /etc/init.d/rtorrentd stop (the first try) , and the rtorrent session was
> properly shutdown (it takes a couple of seconds to disannounce to the trackers)
> and the screen session closed. Why do i have to stop it twice ?
> 

Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-07-28 21:52:49 UTC
Updated the init.d, no version bump, as it's quite obscure I feel.
Comment 7 Marcin Mirosław 2009-08-25 23:14:01 UTC
(In reply to comment #6)
> Updated the init.d, no version bump, as it's quite obscure I feel.

Hmm, imho: Two diffrent user emerge rttorrent on diffrent time, they get diffrent init.d scripts but they have rtorrent in the same version. How can they compare behavior this soft? Imho it should be next -r .