[tahoe-lafs-trac-stream] [Tahoe-LAFS] #1680: Unhandled error in tahoe restart when PID file contains non-numeric value

Tahoe-LAFS trac at tahoe-lafs.org
Sat Sep 27 02:19:43 UTC 2014


#1680: Unhandled error in tahoe restart when PID file contains non-numeric value
-----------------------------------+--------------------------------------
     Reporter:  joepie91           |      Owner:  davidsarah
         Type:  defect             |     Status:  assigned
     Priority:  normal             |  Milestone:  soon
    Component:  code-frontend-cli  |    Version:  1.9.1
   Resolution:                     |   Keywords:  easy error tahoe-restart
Launchpad Bug:                     |
-----------------------------------+--------------------------------------

Old description:

> When the twistd.pid file in the Tahoe-LAFS node/client directory contains
> a non-numeric value (which was somehow the case after unexpected power
> loss on a server), this error is not handled properly when running tahoe
> restart.
>
> Output:
>
> {{{
> tahoe at vps2:~/allmydata-tahoe-1.9.1/bin$ ./tahoe restart
> STOPPING '/home/tahoe/.tahoe'
> Traceback (most recent call last):
>   File "/home/tahoe/allmydata-tahoe-1.9.1/support/bin/tahoe", line 9, in
> <module>
>     load_entry_point('allmydata-tahoe==1.9.1', 'console_scripts',
> 'tahoe')()
>   File "/home/tahoe/allmydata-
> tahoe-1.9.1/src/allmydata/scripts/runner.py", line 113, in run
>     rc = runner(sys.argv[1:], install_node_control=install_node_control)
>   File "/home/tahoe/allmydata-
> tahoe-1.9.1/src/allmydata/scripts/runner.py", line 95, in runner
>     rc = startstop_node.dispatch[command](so, stdout, stderr)
>   File "/home/tahoe/allmydata-
> tahoe-1.9.1/src/allmydata/scripts/startstop_node.py", line 140, in
> restart
>     rc = stop(config, stdout, stderr)
>   File "/home/tahoe/allmydata-
> tahoe-1.9.1/src/allmydata/scripts/startstop_node.py", line 92, in stop
>     pid = int(pid)
> ValueError: invalid literal for int() with base 10: '3 s'
> }}}
>
> The tahoe start command appears to have proper error handling, but does
> not make clear that the daemon has not been started - it looks like a
> warning rather than an error:
>
> {{{
> tahoe at vps2:~/allmydata-tahoe-1.9.1/bin$ ./tahoe start
> STARTING '/home/tahoe/.tahoe'
> Pidfile /home/tahoe/.tahoe/twistd.pid contains non-numeric value
> }}}
>
> (the above code snippet with the tahoe start command was run ''before''
> the tahoe restart command)
>

> Workaround:
>
> Remove the $tahoedir/twistd.pid file (where $tahoedir is the directory
> your tahoe.cfg resides in) and manually ensure no daemons are running
> before starting the daemon.

New description:

 When the twistd.pid file in the Tahoe-LAFS node/client directory contains
 a non-numeric value (which was somehow the case after unexpected power
 loss on a server), this error is not handled properly when running tahoe
 restart.

 Output:

 {{{
 tahoe at vps2:~/allmydata-tahoe-1.9.1/bin$ ./tahoe restart
 STOPPING '/home/tahoe/.tahoe'
 Traceback (most recent call last):
   File "/home/tahoe/allmydata-tahoe-1.9.1/support/bin/tahoe", line 9, in
 <module>
     load_entry_point('allmydata-tahoe==1.9.1', 'console_scripts',
 'tahoe')()
   File "/home/tahoe/allmydata-
 tahoe-1.9.1/src/allmydata/scripts/runner.py", line 113, in run
     rc = runner(sys.argv[1:], install_node_control=install_node_control)
   File "/home/tahoe/allmydata-
 tahoe-1.9.1/src/allmydata/scripts/runner.py", line 95, in runner
     rc = startstop_node.dispatch[command](so, stdout, stderr)
   File "/home/tahoe/allmydata-
 tahoe-1.9.1/src/allmydata/scripts/startstop_node.py", line 140, in restart
     rc = stop(config, stdout, stderr)
   File "/home/tahoe/allmydata-
 tahoe-1.9.1/src/allmydata/scripts/startstop_node.py", line 92, in stop
     pid = int(pid)
 ValueError: invalid literal for int() with base 10: '3 s'
 }}}

 The tahoe start command appears to have proper error handling, but does
 not make clear that the daemon has not been started - it looks like a
 warning rather than an error:

 {{{
 tahoe at vps2:~/allmydata-tahoe-1.9.1/bin$ ./tahoe start
 STARTING '/home/tahoe/.tahoe'
 Pidfile /home/tahoe/.tahoe/twistd.pid contains non-numeric value
 }}}

 (the above code snippet with the tahoe start command was run ''before''
 the tahoe restart command)


 Workaround:

 Remove the $tahoedir/twistd.pid file (where $tahoedir is the directory
 your tahoe.cfg resides in) and manually ensure no daemons are running
 before starting the daemon.

--

Comment (by Lcstyle):

 useability, i like it

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1680#comment:4>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list