-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssh interactions are broken with fresh annex 6.20170403+gitgdbe23d695-1~ndall+1 #1456
Comments
I'm not clear how faecd73f327bee5067998dd6d398033fb09a26a6 broke
datalad. Is datalad setting GIT_SSH/GIT_SSH_COMMAND when it runs
git-annex?
…--
see shy jo
|
yeap. We set 'GIT_SSH_COMMAND' to |
Yaroslav Halchenko wrote:
yeap. We set 'GIT_SSH_COMMAND' to datalad sshrun (if not already in the
environment)
And your argument parser for datalad sshrun does fall over when passed
an extra -n as the first parameter?
If so, I could implement the ANNEX_USE_GIT_SSH=1 thing. At least until
I can find a way to not need to pass -n when running ssh.
…--
see shy jo
|
Verified in the source to SSHRun.
Of course, you could make that code support the extra leading -n
parmater and pass it through to ssh. This would fix the breakage too.
Seems to me that datalad might want to make its sshrun be used when
git-annex runs ssh. I see some rather ugly looking code in datalad that
uses annex-ssh-options to make it use the shared connections now, which
you would be able to get rid of if you used git-annex's GIT_SSH_COMMAND
support.
…--
see shy jo
|
@joeyh yeah -- we didn't support yeap -- we were passing via annex-ssh-options since that was the only way AFAIK to reuse the same connection (managed by us) by both annex and datalad... also we did use GIT_SSH_COMMAND to point to our ssh runner already for pure git interactions. Or what do you mean by " if you used git-annex's GIT_SSH_COMMAND support."? that if with new functionality in annex we just remove passing control paths via annex-ssh-options? |
Fixed on git-annex's side in b6f26bac86e1332410122d3dc43d9723e1ea8afa
I'd still suggest making datalad support git-annex's variation of
GIT_SSH_COMMAND and use it instead of annex-ssh-options.
…--
see shy jo
|
thanks -- I will check it out right away |
Yaroslav Halchenko wrote:
Or what do you mean by " if you used git-annex's GIT_SSH_COMMAND
support."? that if with new functionality in annex we just remove passing
control paths via annex-ssh-options?
Correct, you could.
…--
see shy jo
|
b6f26bac86e1332410122d3dc43d9723e1ea8afa FTBFS due to failing tests for me (in stretch):
on our end -- fixed up for #1458 and |
@joeyh part (or whole?) of the issue is quite elaborate non-escaping or just concatenation of strings in now invoked 'configlist' (didn't invoke before for annex sync I believe, or at least didn't for us in that test) command: $> ps w --pid 31252
PID TTY STAT TIME COMMAND
31252 pts/6 R+ 2:51 /home/yoh/proj/datalad/datalad/venvs/dev/bin/python2 /home/yoh/proj/datalad/datalad/venvs/dev/bin/datalad sshrun datalad-test 'git-annex-shell '"'"'configlist'"'"' '"'"'/tmp/datalad_temp_testrepo_dPT_tB'"'"' '"'"'--'"'"' '"'"'autoinit=1'"'"' '"'"'--'"'"''
$> ps w --pid 31214
PID TTY STAT TIME COMMAND
31214 pts/6 S+ 0:00 /usr/lib/git-annex.linux/exe/sh --library-path /usr/lib/git-annex.linux//usr/lib/x86_64-linux-gnu/gconv:/usr/lib/git-annex.linux//usr/lib/x86_64-linux-gnu/audit:/usr/lib/git-annex.linux//etc/ld.so.conf.d:/usr/lib/git-annex.linux//lib64:/usr/lib/git-annex.linux//usr/lib/x86_64-linux-gnu:/usr
$> ps w --pid 31214 | cat
PID TTY STAT TIME COMMAND
31214 pts/6 S+ 0:00 /usr/lib/git-annex.linux/exe/sh --library-path /usr/lib/git-annex.linux//usr/lib/x86_64-linux-gnu/gconv:/usr/lib/git-annex.linux//usr/lib/x86_64-linux-gnu/audit:/usr/lib/git-annex.linux//etc/ld.so.conf.d:/usr/lib/git-annex.linux//lib64:/usr/lib/git-annex.linux//usr/lib/x86_64-linux-gnu:/usr/lib/git-annex.linux//lib/x86_64-linux-gnu: /usr/lib/git-annex.linux/shimmed/sh/sh -n -c datalad sshrun "$@" datalad sshrun datalad-test 'git-annex-shell '"'"'configlist'"'"' '"'"'/tmp/datalad_temp_testrepo_dPT_tB'"'"' '"'"'--'"'"' '"'"'autoinit=1'"'"' '"'"'--'"'"''
$> ps w --pid 31215 | cat
PID TTY STAT TIME COMMAND
31215 pts/6 S+ 0:00 /home/yoh/proj/datalad/datalad/venvs/dev/bin/python2 /home/yoh/proj/datalad/datalad/venvs/dev/bin/datalad sshrun datalad-test 'git-annex-shell '"'"'configlist'"'"' '"'"'/tmp/datalad_temp_testrepo_dPT_tB'"'"' '"'"'--'"'"' '"'"'autoinit=1'"'"' '"'"'--'"'"''
$> ps w --pid 31252 | cat
PID TTY STAT TIME COMMAND
31252 pts/6 R+ 3:13 /home/yoh/proj/datalad/datalad/venvs/dev/bin/python2 /home/yoh/proj/datalad/datalad/venvs/dev/bin/datalad sshrun datalad-test 'git-annex-shell '"'"'configlist'"'"' '"'"'/tmp/datalad_temp_testrepo_dPT_tB'"'"' '"'"'--'"'"' '"'"'autoinit=1'"'"' '"'"'--'"'"''
$> cat /proc/31252/cmdline
/home/yoh/proj/datalad/datalad/venvs/dev/bin/python2/home/yoh/proj/datalad/datalad/venvs/dev/bin/dataladsshrundatalad-test'git-annex-shell '"'"'configlist'"'"' '"'"'/tmp/datalad_temp_testrepo_dPT_tB'"'"' '"'"'--'"'"' '"'"'autoinit=1'"'"' '"'"'--'"'"''% and then our |
@joeyh here is the comparison from running "good/bad" versions of annex (grepping on the path of the socket which we had in each of those relevant invocations): $> grep -e Run.*ce7ee7ea log-output.good
{4146}[DEBUG] Running: ['git', '-c', 'receive.autogc=0', '-c', 'gc.auto=0', 'annex', 'sync', '--debug', '-c', 'remote.ssh-remote-1.annex-ssh-options=-o ControlMaster=auto -S /home/yoh/.cache/datalad/sockets/ce7ee7ea']
{10990}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{10990}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{10990}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', "sh -e -c 'dirname $(readlink -f $(which git-annex-shell))'"]
{10990}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', 'export "PATH=/usr/lib/git-annex.linux:$PATH"; git-upload-pack \'/tmp/datalad_temp_testrepo_B9HaXK\'']
{11069}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{11069}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{11069}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', "sh -e -c 'dirname $(readlink -f $(which git-annex-shell))'"]
{11069}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', 'export "PATH=/usr/lib/git-annex.linux:$PATH"; git-receive-pack \'/tmp/datalad_temp_testrepo_B9HaXK\'']
{11144}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{11144}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{11144}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', "sh -e -c 'dirname $(readlink -f $(which git-annex-shell))'"]
{11144}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', 'export "PATH=/usr/lib/git-annex.linux:$PATH"; git-receive-pack \'/tmp/datalad_temp_testrepo_B9HaXK\'']
{11230}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{11230}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{11230}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', "sh -e -c 'dirname $(readlink -f $(which git-annex-shell))'"]
{11230}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', 'export "PATH=/usr/lib/git-annex.linux:$PATH"; git-receive-pack \'/tmp/datalad_temp_testrepo_B9HaXK\'']
{4146}[DEBUG] Running: ['git', '-c', 'receive.autogc=0', '-c', 'gc.auto=0', 'annex', 'sync', '--debug', '-c', 'remote.ssh-remote-1.annex-ssh-options=-o ControlMaster=auto -S /home/yoh/.cache/datalad/sockets/ce7ee7ea', '-c', 'remote.ssh-remote-2.annex-ssh-options=-o ControlMaster=auto -S /home/yoh/.cache/datalad/sockets/ef2d633e', 'ssh-remote-2']
{4146}[DEBUG] Running: ['ssh', '-O', 'stop', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
$> grep -e Run.*ce7ee7ea log-output.bad
{12163}[DEBUG] Running: ['git', '-c', 'receive.autogc=0', '-c', 'gc.auto=0', 'annex', 'sync', '--debug', '-c', 'remote.ssh-remote-1.annex-ssh-options=-o ControlMaster=auto -S /home/yoh/.cache/datalad/sockets/ce7ee7ea']
{18716}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{18716}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', "sh -e -c 'dirname $(readlink -f $(which git-annex-shell))'"]
{18716}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', 'export "PATH=/usr/lib/git-annex.linux:$PATH"; \'git-annex-shell \'"\'"\'configlist\'"\'"\' \'"\'"\'/tmp/datalad_temp_testrepo_3dZQkL\'"\'"\' \'"\'"\'--\'"\'"\' \'"\'"\'autoinit=1\'"\'"\' \'"\'"\'--\'"\'"\'\'']
{18716}[DEBUG] Running: ['ssh', '-O', 'stop', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{18757}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{18757}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', "sh -e -c 'dirname $(readlink -f $(which git-annex-shell))'"]
{18757}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', 'export "PATH=/usr/lib/git-annex.linux:$PATH"; git-upload-pack \'/tmp/datalad_temp_testrepo_3dZQkL\'']
{18757}[DEBUG] Running: ['ssh', '-O', 'stop', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{18841}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{18841}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', "sh -e -c 'dirname $(readlink -f $(which git-annex-shell))'"]
{18841}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', 'export "PATH=/usr/lib/git-annex.linux:$PATH"; git-upload-pack \'/tmp/datalad_temp_testrepo_3dZQkL\'']
{18841}[DEBUG] Running: ['ssh', '-O', 'stop', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{18938}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{18938}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', "sh -e -c 'dirname $(readlink -f $(which git-annex-shell))'"]
{18938}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', 'export "PATH=/usr/lib/git-annex.linux:$PATH"; git-receive-pack \'/tmp/datalad_temp_testrepo_3dZQkL\'']
{18938}[DEBUG] Running: ['ssh', '-O', 'stop', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{19010}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{19010}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', "sh -e -c 'dirname $(readlink -f $(which git-annex-shell))'"]
{19010}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', 'export "PATH=/usr/lib/git-annex.linux:$PATH"; git-receive-pack \'/tmp/datalad_temp_testrepo_3dZQkL\'']
{19010}[DEBUG] Running: ['ssh', '-O', 'stop', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{19082}[DEBUG] Running: ['ssh', '-O', 'check', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
{19082}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', "sh -e -c 'dirname $(readlink -f $(which git-annex-shell))'"]
{19082}[DEBUG] Running: ['ssh', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test', 'export "PATH=/usr/lib/git-annex.linux:$PATH"; git-receive-pack \'/tmp/datalad_temp_testrepo_3dZQkL\'']
{19082}[DEBUG] Running: ['ssh', '-O', 'stop', '-o', 'ControlPath="/home/yoh/.cache/datalad/sockets/ce7ee7ea"', 'datalad-test']
|
@joeyh note how the entire call for $> ssh localhost "'echo \"123\"'"
zsh:1: command not found: echo "123"
*$> ssh test@localhost "'echo \"123\"'"
bash: echo "123": command not found (surrounded with "" to make it into a single command line argument for ssh invocation) |
It may be that git-annex's GIT_SSH_COMMAND or GIT_SSH emulation has a
bug in it. If so, please file a bug report on git-annex with the
details, including how to reproduce it etc.
…--
see shy jo
|
I looked at this again, and I still lack enough information to help with it. I lack even a clear description of what the problem is. If the problem is git-annex test failing, then I can't reproduce that. If the problem is something complicated involving GIT_SSH as used by datalad and shell escaping, I will need to know what environment variable is getting set to what. |
was almost fully addressed by #1461 and current annex version 6.20170408+gitg804f06baa-1~ndall+1, without explicit GIT_ANNEX_USE_GIT_SSH=1, should function normally according to the tests |
which I have managed to upload although I thought I have tested it locally first
I think (actually now certain since succeeds with
6.20170317+gitg8cd473c71-1~ndall+1
and fails with the6.20170317+gitgfaecd73f3-1~ndall+1
) it is due toand I guess we should just move from passing them via -c remote.*.annex-ssh-optionsif that is so, following the commit msg -- @joeyh know that you did break someone's workflow and I am complaining! The issue is that we can't just use env variables to point to the socket paths (e.g. during sync), since those would be different for different remotes and multiple remotes might be communicated in a single git annex call.
@joeyh - please advise on how to proceed
The text was updated successfully, but these errors were encountered: