Display a warning when concurrency is enabled but ssh connection caching is not enabled or won't work due to a crippled filesystem

A warning message is unsatisfying. But erroring out is too hard a failure,
especially since it may well work fine if the user has enabled passwordless
ssh.

I did think about falling back to one ssh connection at a time in this
case, but it would have needed a rework of every ssh call, which
seems far overboard for such a niche problem. There's no single place where
git-annex runs ssh, so no one place that it could block a concurrent call
on a semaphore. And, even if it did fall back to one ssh connection at a
time, it seems to me that doing so without warning the user about the
problem just invites bug reports like "git-annex is ignoring my -J2 and
only doing one download at a time". So a warning is needed, and I suppose
is good enough.
This commit is contained in:
Joey Hess 2020-01-23 12:35:46 -04:00
parent 81b06588a1
commit 5c3636037b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 66 additions and 7 deletions

View file

@ -212,8 +212,8 @@ case "$os" in
useproot=1
# Store ssh connection caching sockets outside of sdcard.
GIT_ANNEX_TMP_DIR="$TMPDIR"
export GIT_ANNEX_TMP_DIR
GIT_ANNEX_SSH_SOCKET_DIR="$TMPDIR"
export GIT_ANNEX_SSH_SOCKET_DIR
GIT_ANNEX_STANDLONE_ENV="PATH GCONV_PATH MANPATH LOCPATH"
export GIT_ANNEX_STANDLONE_ENV