MarketSquare / MarketSquare/SSHLibrary

non-configurable timeout for scp

Open
#397 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement priority: medium
Dominant language
Python
Stars
167
Forks
145
PR merge metrics
No merged PRs in 30d

Description

scp.py has a default but configurable timeout of 10 seconds: https://github.com/jbardin/scp.py/blob/master/scp.py#L103

In our case this is sometimes too short. Our ssh server takes a long time to reply to the connection request (probably because of misconfigured DNS causing DNS lookup timeouts). As a result we get a timeout error.

This timeout does not seem to be configurable without modifying sshlibrary. The connection timeout (used for Read Until) is not forwarded to scp.py, and there is no other way to set it (I don't know if it makes sense to use the same timeout). Only the transport is passed to the SCPClient constructor: https://github.com/robotframework/SSHLibrary/blob/master/src/SSHLibrary/pythonclient.py#L394

Does it make sense to reuse the timeout from the connection configuration for this? If that's appropriate, I think the fix would be reasonably easy to do.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scp.py around the default 10-second timeout and SSHLibrary/pythonclient.py around the SCPClient construction. Trace how the connection timeout is stored and whether it can be passed to SCPClient. Done means the SCP timeout is configurable through the connection configuration and no longer fails solely at the fixed 10-second limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.