Skip to content

ssh -f -n option unexpectedly blocks the job #769

@jy5275

Description

@jy5275

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

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 &")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions