drone-ssh icon indicating copy to clipboard operation
drone-ssh copied to clipboard

drone-ssh command never returns in a particular task in a Tekton pipeline run

Open yeeyaa opened this issue 8 months ago • 2 comments

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

yeeyaa avatar Jun 12 '24 12:06 yeeyaa