canonical / canonical/testflinger

`ssh -f -n` option unexpectedly blocks the job

Open
#769 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
26
Forks
49
Avg merge
4d 8h
Merged PRs (30d)
16

Description

The job (https://testflinger.canonical.com/jobs/c057b99a-16a8-4d67-b54e-5ce826d2e5f2) got the results "output timeout reached (900s)".

```yaml
job_queue: sonic-ci
provision_data:
distro: jammy
test_data:
test_cmds: |
ssh -f -n ubuntu@$DEVICE_IP "cd /xxx/xxx && python3 -m http.server 8080"
```

The test phase of the above job never finishes and gets blocked until the output timeout reached.

However, running the `ssh -f -n` command directly or running a shell script with this command don't get blocked.

(The workaround: `ssh ubuntu@$DEVICE_IP "nohup python3 -m http.server 8080 --directory path_to_dir > /dev/null 2>&1 &"`)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing job c057b99a-16a8-4d67-b54e-5ce826d2e5f2 or the shown test command during the test phase, and compare direct execution with execution through Testflinger. Trace why `ssh -f -n` keeps the job blocked, then verify that the test phase finishes without reaching the 900-second output timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.