Opened 10 years ago

Closed 9 years ago

#1130 closed defect (fixed)

fedora rpm: init.d/tor/restart on relay will kill the relay

Reported by: arma Owned by: erinn
Priority: Low Milestone:
Component: Applications/Tor bundles/installation Version: 0.2.1.19
Severity: Keywords:
Cc: arma, erinn, mikeperry Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Install the fedora tor rpm. Make yourself a relay (i.e. uncomment ORPort in
your /etc/tor/torrc). Then restart your Tor so your relay starts.

Then do an init.d/tor/restart. It will tell your Tor to start shutting down,
and Tor will exit in 30 seconds (or whatever the ShutdownWaitLength config
option is set to). But the restart thinks it's dead right then, and tries
to start Tor, which fails.

End result: upgrade your Tor and your relay ends up not running.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (4)

comment:1 Changed 10 years ago by arma

See the Tor deb init script for how to do that right.

debian/tor.init in git has a wait_for_deaddaemon clause that may
be helpful.

comment:3 Changed 10 years ago by mikeperry

It looks like there is code in my fc12 init scripts to wait for TOR_SHUTDOWN_WAIT=30 seconds for tor to shut down now.
I don't run any relays from the rpm though.. tor-0.2.1.22-1200.fc12.i686.

stop() {

echo -n $"Stopping $prog: "
if ! killproc -p "$pidfile" $prog -INT; then

log_failure_msg

else

cnt=$TOR_SHUTDOWN_WAIT
while let '--cnt > 0' && killproc -p "$pidfile" $prog -0; do

sleep 1

done

if test $cnt -ne 0
killproc -p "$pidfile" $prog; then

log_success_msg

else

log_failure_msg

fi

fi

rm -f $pidfile $lockfile

}

comment:4 Changed 9 years ago by katmagic

Resolution: Nonefixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.