summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-12-13 12:05:05 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-12-13 12:12:38 -0400
commitf1f846bfce78f6ee82eccd93e3dbb0bd1d559e8a (patch)
tree09e92fcac0c6f0a1cdd4899f6ad33ae1f7585570
parent0e4bd345ac17e95b1e2d0b547d1c7be669a00af1 (diff)
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.
-rw-r--r--Annex/Locations.hs5
-rw-r--r--Annex/Ssh.hs39
-rw-r--r--CHANGELOG4
-rw-r--r--doc/bugs/Allow_automatic_retry_git_annex_get.mdwn2
-rw-r--r--doc/bugs/Allow_automatic_retry_git_annex_get/comment_4_899b66a20b8e29a23068d249a461c19f._comment16
-rw-r--r--doc/bugs/git_annex_init_failed_due_to_unsupported_ssh_option.mdwn2
-rw-r--r--doc/bugs/ssh___34__Include__34___breaks_user-specified_IgnoreUnknown.mdwn4
-rw-r--r--doc/bugs/ssh___34__Include__34___feature_broke_Android.mdwn2
8 files changed, 35 insertions, 39 deletions
diff --git a/Annex/Locations.hs b/Annex/Locations.hs
index 9f829fda1..a6af4d417 100644
--- a/Annex/Locations.hs
+++ b/Annex/Locations.hs
@@ -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"
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs
index 4377de4c5..4f879436b 100644
--- a/Annex/Ssh.hs
+++ b/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. -}
diff --git a/CHANGELOG b/CHANGELOG
index bd3134850..4bd69705b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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
diff --git a/doc/bugs/Allow_automatic_retry_git_annex_get.mdwn b/doc/bugs/Allow_automatic_retry_git_annex_get.mdwn
index 0e85b7acf..c6e406b49 100644
--- a/doc/bugs/Allow_automatic_retry_git_annex_get.mdwn
+++ b/doc/bugs/Allow_automatic_retry_git_annex_get.mdwn
@@ -59,5 +59,3 @@ SHA256E-s41311329--69c3b054a3fe9676133605730d85b7fcef8696f6782d402a524e41b836253
[[!meta title="Detect stalled transfer and retry or abort it"]]
-
-> [[done]] --[[Joey]]
diff --git a/doc/bugs/Allow_automatic_retry_git_annex_get/comment_4_899b66a20b8e29a23068d249a461c19f._comment b/doc/bugs/Allow_automatic_retry_git_annex_get/comment_4_899b66a20b8e29a23068d249a461c19f._comment
new file mode 100644
index 000000000..6d2506923
--- /dev/null
+++ b/doc/bugs/Allow_automatic_retry_git_annex_get/comment_4_899b66a20b8e29a23068d249a461c19f._comment
@@ -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.
+"""]]
diff --git a/doc/bugs/git_annex_init_failed_due_to_unsupported_ssh_option.mdwn b/doc/bugs/git_annex_init_failed_due_to_unsupported_ssh_option.mdwn
index eb961030c..f4339bff7 100644
--- a/doc/bugs/git_annex_init_failed_due_to_unsupported_ssh_option.mdwn
+++ b/doc/bugs/git_annex_init_failed_due_to_unsupported_ssh_option.mdwn
@@ -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]]
diff --git a/doc/bugs/ssh___34__Include__34___breaks_user-specified_IgnoreUnknown.mdwn b/doc/bugs/ssh___34__Include__34___breaks_user-specified_IgnoreUnknown.mdwn
index b910ac408..20878cb21 100644
--- a/doc/bugs/ssh___34__Include__34___breaks_user-specified_IgnoreUnknown.mdwn
+++ b/doc/bugs/ssh___34__Include__34___breaks_user-specified_IgnoreUnknown.mdwn
@@ -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]]
diff --git a/doc/bugs/ssh___34__Include__34___feature_broke_Android.mdwn b/doc/bugs/ssh___34__Include__34___feature_broke_Android.mdwn
index 9be4d4318..ca5b86c87 100644
--- a/doc/bugs/ssh___34__Include__34___feature_broke_Android.mdwn
+++ b/doc/bugs/ssh___34__Include__34___feature_broke_Android.mdwn
@@ -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]]