drone-ssh command never returns in a particular task in a Tekton pipeline run
- Dominant language
- Go
- Stars
- 314
- Forks
- 79
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
We are using drone-ssh in our tekton pipeline for remote execution of some commands on our servers. As advised by the tekton community: https://hub.tekton.dev/tekton/task/remote-ssh-commands.
However, in one of our tasks, the `drone-ssh` command is never returned which is causing the task to hang and eventually timeout.
From the log output, we can see the scripts passed to the `drone-ssh` command have been successfully executed. But it's just not returning and ending the drone-ssh command.
Could you please help identify where the issue might be? I'm using `latest` tag.
Same issue has been reported to tekton as well: https://github.com/tektoncd/catalog/issues/1277
Task configuration in the pipeline:
```
- displayName: Install PAC - BRT
name: task-install-pac-brt-cluster
params:
- name: HOST
value: $(params.pac-fyre-host)
- name: USERNAME
value: $(params.default-brt-login-user)
- name: SSH_SCRIPT
value: |
#!/usr/bin/bash
$(params.path-to-pipeline-scripts)/install_lsf_brt.sh
sleep 60
$(params.path-to-pipeline-scripts)/install_pac_brt.sh
runAfter:
- task-build-hpc-package
- copy-repo-to-remote-host
taskRef:
kind: Task
name: remote-ssh-commands
timeout: 30m0s
when:
- input: $(params.should-run-install-pac-brt-cluster)
operator: in
values:
- 'yes'
- 'y'
- 'YES'
- 'yes'
workspaces:
- name: credentials
```
Task definition, as shown in the tekton catalog source here: https://github.com/tektoncd/catalog/blob/main/task/remote-ssh-commands/0.1/remote-ssh-commands.yaml
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked Tekton remote-ssh-commands task definition and compare its drone-ssh invocation with the task configuration shown. Reproduce the non-returning command using the supplied scripts, sleep, and timeout context; done means identifying whether the hang is in the task wrapper or drone-ssh and documenting a confirmed fix or workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100