--autostart #2146

Open
opened 2014-01-08 20:19:28 +00:00 by joeyh · 6 comments
joeyh commented 2014-01-08 20:19:28 +00:00
Owner

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).

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).
tahoe-lafs added the
unknown
normal
defect
1.10.0
labels 2014-01-08 20:19:28 +00:00
tahoe-lafs added this to the undecided milestone 2014-01-08 20:19:28 +00:00
zooko commented 2014-01-08 21:35:07 +00:00
Author
Owner

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

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
joeyh commented 2014-01-08 21:53:31 +00:00
Author
Owner

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.

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

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. #719 is annoying if it happens, but git-annex will simply fail that operation and it can be retried later.
joeyh commented 2014-01-08 22:55:18 +00:00
Author
Owner

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.

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.
zooko commented 2014-01-08 23:21:13 +00:00
Author
Owner

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

Opened #2149 to be about the issue with error messages from `tahoe start` when the process is already running.
tahoe-lafs added
code-nodeadmin
and removed
unknown
labels 2014-01-09 18:40:12 +00:00
zooko commented 2015-02-10 17:53:19 +00:00
Author
Owner

#2383 was a duplicate of this.

#2383 was a duplicate of this.
zooko commented 2015-02-10 18:54:05 +00:00
Author
Owner

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

Actually maybe #2383 is a different purpose, because in #2383 the node stops again after it completes the operation.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#2146
No description provided.