Skip to content
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 only transport #4235

Closed
wants to merge 9 commits into from
Closed

Ssh only transport #4235

wants to merge 9 commits into from

Conversation

adegomme
Copy link
Contributor

@adegomme adegomme commented Jul 9, 2020

As discussed in #4199 here is a preliminary implementation of a SSH transport without SFTP.
It's been tested and works to submit jobs and gather results on two different systems with SFTP disabled/forbidden (one with slurm, one direct).
It has not yet been tested with large files yet ( see #3787 ) so this should not be merged. I will do this as soon as possible.

I switched from the earlier mockup of an SFTP client (in order to keep all self.sftp.xxx calls as is), to a different transport. This loses the ability to dynamically default to sshonly when sftp is found to not work, but is generally cleaner.

Only changes in ssh.py were:

  • split initialization of file transport client
  • add an explicit message when sftp opening fails.
  • split calls to separate self.sftp calls in their own methods (overriden in the sshonly transport).
  • when logging remote commands to execute, limit the output to 1k chars, as full files are copied through this mechanism in sshonly mode.

This keeps references to sftp only in very basic internal calls that can be overriden.
SSH only client copies files with cat, triggering full file content to be printed here. Which can be a lot.
It's a variant of the ssh transport, inheriting it and replacing each sftp command by an equivalent pure ssh call.
This has been (quickly) tested to work to submit jobs and gather results on two different systems without sftp access (slurm and direct).
@ltalirz
Copy link
Member

ltalirz commented Jul 13, 2020

@adegomme just to let you know that in case you would like someone to review this draft PR, you'll need to ping them

@adegomme adegomme mentioned this pull request Sep 8, 2020
@adegomme
Copy link
Contributor Author

adegomme commented Sep 8, 2020

closing - this is mainly moved to a plugin, and I will open another PR for the ssh.py parts which could need changing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants