#2146 new defect

--autostart

Reported by: joeyh Owned by:
Priority: normal Milestone: undecided
Component: code-nodeadmin Version: 1.10.0
Keywords: tahoe-start usability error quiet git-annex Cc:
Launchpad Bug:

Description

For the git-annex interface to tahoe, it would be useful if commands like put, get, and check had a --autostart option that ran a tahoe start if the daemon was not already running.

Otherwise, git-annex can only tell if the daemon is running by probing either the pid file or the web server url. Both are subject to false positives (the pid file could be stale; something else could have been randomly allocated the network port).

Change History (7)

comment:1 Changed at 2014-01-08T21:35:07Z by zooko

Dear joeyh:

Thanks for the good bug report! Over on http://source.git-annex.branchable.com/?p=source.git;a=commitdiff;h=85272d8a988b249d755ac3f8133e2bf8126fb271 you wrote::

Known problems:

  1. Tries to tahoe start when daemon is already running.

But why is this a problem? The functional behavior of tahoe start is to detect whether tahoe is already running, and if it is not running start it. So, it seems to me that executing tahoe start immediately before doing anything is the right thing to do. What could we do better? Maybe change the docs of tahoe start so that it clearly explains that it will start tahoe only if it is not already running?

By the way, there is a different problem that is potentially a major problem for your use: #719

comment:2 Changed at 2014-01-08T21:53:31Z by joeyh

Well, tahoe start prints out an error message when it's already running. I don't want to discard stderr since this would hide legitimate error messages.

#179 is annoying if it happens, but git-annex will simply fail that operation and it can be retried later.

Version 0, edited at 2014-01-08T21:53:31Z by joeyh (next)

comment:3 Changed at 2014-01-08T22:55:18Z by joeyh

An alternate approach that would do for me would be to make tahoe start --quiet not print anything, even if tahoe is already running. I have filed #2148 about other commands that --quiet doesn't hush up.

I still think that --autostart would be nice, but the above approach would be enough for git-annex, and has the advantage that git-annex can start using tahoe start --quiet today, without worrying about the user needing to get a new tahoe release with --autostart support.

comment:4 Changed at 2014-01-08T23:21:13Z by zooko

Opened #2149 to be about the issue with error messages from tahoe start when the process is already running.

comment:5 Changed at 2014-01-09T18:40:12Z by daira

  • Component changed from unknown to code-nodeadmin
  • Keywords tahoe-start usability error quiet git-annex added
  • Owner daira deleted

comment:6 Changed at 2015-02-10T17:53:19Z by zooko

#2383 was a duplicate of this.

comment:7 Changed at 2015-02-10T18:54:05Z by zooko

Actually maybe #2383 is a different purpose, because in #2383 the node stops again after it completes the operation.

Note: See TracTickets for help on using tickets.