Revert ServerAliveInterval
Revert ServerAliveInterval change in 6.20161111, which caused problems with too many old versions of ssh and unusual ssh configurations. It should have not been needed anyway since ssh is supposted to have TCPKeepAlive enabled by default.
This commit is contained in:
parent
1d516069d8
commit
48d9624a2d
8 changed files with 35 additions and 39 deletions
|
@ -63,7 +63,6 @@ module Annex.Locations (
|
|||
gitAnnexUrlFile,
|
||||
gitAnnexTmpCfgFile,
|
||||
gitAnnexSshDir,
|
||||
gitAnnexSshConfig,
|
||||
gitAnnexRemotesDir,
|
||||
gitAnnexAssistantDefaultDir,
|
||||
HashLevels(..),
|
||||
|
@ -403,10 +402,6 @@ gitAnnexTmpCfgFile r = gitAnnexDir r </> "config.tmp"
|
|||
gitAnnexSshDir :: Git.Repo -> FilePath
|
||||
gitAnnexSshDir r = addTrailingPathSeparator $ gitAnnexDir r </> "ssh"
|
||||
|
||||
{- .git/annex/ssh.config is used to configure ssh. -}
|
||||
gitAnnexSshConfig :: Git.Repo -> FilePath
|
||||
gitAnnexSshConfig r = gitAnnexDir r </> "ssh.config"
|
||||
|
||||
{- .git/annex/remotes/ is used for remote-specific state. -}
|
||||
gitAnnexRemotesDir :: Git.Repo -> FilePath
|
||||
gitAnnexRemotesDir r = addTrailingPathSeparator $ gitAnnexDir r </> "remotes"
|
||||
|
|
39
Annex/Ssh.hs
39
Annex/Ssh.hs
|
@ -33,7 +33,6 @@ import qualified Git.Url
|
|||
import Config
|
||||
import Annex.Path
|
||||
import Utility.Env
|
||||
import Utility.Tmp
|
||||
import Types.CleanupActions
|
||||
import Git.Env
|
||||
#ifndef mingw32_HOST_OS
|
||||
|
@ -50,37 +49,13 @@ sshOptions (host, port) gc opts = go =<< sshCachingInfo (host, port)
|
|||
go (Just socketfile, params) = do
|
||||
prepSocket socketfile
|
||||
ret params
|
||||
ret ps = do
|
||||
overideconfigfile <- fromRepo gitAnnexSshConfig
|
||||
-- We assume that the file content does not change.
|
||||
-- If it did, a more expensive test would be needed.
|
||||
liftIO $ unlessM (doesFileExist overideconfigfile) $
|
||||
viaTmp writeFile overideconfigfile $ unlines
|
||||
-- Make old version of ssh that does
|
||||
-- not know about Include ignore those
|
||||
-- entries.
|
||||
[ "IgnoreUnknown Include"
|
||||
-- ssh expands "~"
|
||||
, "Include ~/.ssh/config"
|
||||
-- ssh will silently skip the file
|
||||
-- if it does not exist
|
||||
, "Include /etc/ssh/ssh_config"
|
||||
-- Everything below this point is only
|
||||
-- used if there's no setting for it in
|
||||
-- the above files.
|
||||
--
|
||||
-- Make sure that ssh detects stalled
|
||||
-- connections.
|
||||
, "ServerAliveInterval 60"
|
||||
]
|
||||
return $ concat
|
||||
[ ps
|
||||
, [Param "-F", File overideconfigfile]
|
||||
, map Param (remoteAnnexSshOptions gc)
|
||||
, opts
|
||||
, portParams port
|
||||
, [Param "-T"]
|
||||
]
|
||||
ret ps = return $ concat
|
||||
[ ps
|
||||
, map Param (remoteAnnexSshOptions gc)
|
||||
, opts
|
||||
, portParams port
|
||||
, [Param "-T"]
|
||||
]
|
||||
|
||||
{- Returns a filename to use for a ssh connection caching socket, and
|
||||
- parameters to enable ssh connection caching. -}
|
||||
|
|
|
@ -6,6 +6,10 @@ git-annex (6.20161211) UNRELEASED; urgency=medium
|
|||
* Pass annex.web-options to wget and curl after other options, so that
|
||||
eg --no-show-progress can be set by the user to disable the default
|
||||
--show-progress.
|
||||
* Revert ServerAliveInterval change in 6.20161111, which caused problems
|
||||
with too many old versions of ssh and unusual ssh configurations.
|
||||
It should have not been needed anyway since ssh is supposted to
|
||||
have TCPKeepAlive enabled by default.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Sun, 11 Dec 2016 21:29:51 -0400
|
||||
|
||||
|
|
|
@ -59,5 +59,3 @@ SHA256E-s41311329--69c3b054a3fe9676133605730d85b7fcef8696f6782d402a524e41b836253
|
|||
|
||||
|
||||
[[!meta title="Detect stalled transfer and retry or abort it"]]
|
||||
|
||||
> [[done]] --[[Joey]]
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
[[!comment format=mdwn
|
||||
username="joey"
|
||||
subject="""comment 4"""
|
||||
date="2016-12-13T16:05:42Z"
|
||||
content="""
|
||||
Could the original bug reporter please show what your ~/.ssh/config
|
||||
contains? As far as I can tell, ssh's TCPKeepAlive option, which is
|
||||
supposed to be enabled by default, unless you have disabled it, should
|
||||
avoid such problems.
|
||||
|
||||
It may also help to set ServerAliveInterval.
|
||||
|
||||
Unfortunately, my attempt to make git-annex set ServerAliveInterval
|
||||
when running ssh broke too many systems with old sshed, and I have had to
|
||||
revert it.
|
||||
"""]]
|
|
@ -65,3 +65,5 @@ I would just like to be sure nothing else is hidden.
|
|||
> .git/config to remove that in order to recover from the problem, so might
|
||||
> as well remove `.git/annex/ssh_config` too.
|
||||
> --[[Joey]]
|
||||
|
||||
>> Fixed more by stopping using `.git/annex/ssh_config` at all. --[[Joey]]
|
||||
|
|
|
@ -24,3 +24,7 @@ To be fair, this might be an OpenSSH bug (IgnoreUnknown ought to be merged), but
|
|||
### Have you had any luck using git-annex before? (Sometimes we get tired of reading bug reports all day and a lil' positive end note does wonders)
|
||||
|
||||
Yes, it's been taking care of my archives for nearly a year.
|
||||
|
||||
> How annoying, ssh seems to make it impossible to set this in a way that
|
||||
> doesn't break some configurations. Oh well, gave up on setting it
|
||||
> and removed the code to do so. [[done]] --[[Joey]]
|
||||
|
|
|
@ -6,3 +6,5 @@ Unfortunately, the Android apk (which I got from https://downloads.kitenet.net/g
|
|||
I had to edit .git/annex/ssh.config to comment out the three offending lines and then append the contents of ~/.ssh/config to get git-annex working again.
|
||||
|
||||
(This is on a Nexus 10 running stock, though I doubt it matters)
|
||||
|
||||
> Reverted use of this feature for now.[[done]] --[[Joey]]
|
||||
|
|
Loading…
Add table
Reference in a new issue