From 8de1359bbbb3a5bd8a4a5588bacef88eb234bb7b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Apr 2014 14:10:29 -0400 Subject: make git-remote-daemon ssh transport robust * Remote system might be available, and connection get lost. Should reconnect, but needs to avoid bad behavior (ie, constant reconnect attempts.) Use exponential backoff. * Detect if old system had a too old git-annex-shell, and show the user a nice message in the webapp. Required parsing error messages, so perhaps this code shoudl be removed once enough time has passed.. * Switch the protocol to using remote URI's, rather than remote names. Names change. Also avoids issues with serialization of names containing whitespace. This is nearly ready for merge into master now. I'd still like to make the ssh transport smarter about reusing ssh connection caching during git pull. This commit was sponsored by Jim Paris. --- doc/design/git-remote-daemon.mdwn | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'doc/design/git-remote-daemon.mdwn') diff --git a/doc/design/git-remote-daemon.mdwn b/doc/design/git-remote-daemon.mdwn index f7de3a280..8c7443319 100644 --- a/doc/design/git-remote-daemon.mdwn +++ b/doc/design/git-remote-daemon.mdwn @@ -69,24 +69,28 @@ the webapp. ## emitted messages -* `CONNECTED $remote` +* `CONNECTED uri` Sent when a connection has been made with a remote. -* `DISCONNECTED $remote` +* `DISCONNECTED uri` Sent when connection with a remote has been lost. -* `SYNCING $remote` +* `SYNCING uri` Indicates that a pull or a push with a remote is in progress. Always followed by DONESYNCING. -* `DONESYNCING 1|0 $remote` +* `DONESYNCING uri 1|0` Indicates that syncing with a remote is done, and either succeeded (1) or failed (0). +* `WARNING`uri string` + + A message to display to the user about a remote. + ## consumed messages * `PAUSE` @@ -166,11 +170,6 @@ TODO: * Remote system might not be available. Find a smart way to detect it, ideally w/o generating network traffic. One way might be to check if the ssh connection caching control socket exists, for example. -* Remote system might be available, and connection get lost. Should - reconnect, but needs to avoid bad behavior (ie, constant reconnect - attempts.) -* Detect if old system had a too old git-annex-shell and avoid bad - behavior. * CONNECTED and DISCONNECTED are not wired into any webapp UI; could be used to show an icon when a ssh remote is available -- cgit v1.2.3