Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-16114

SSH task sometimes hangs when using sudo su - user

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Low
    • None
    • None
    • None
    • None

    Description

      Summary

      When creating a SSH key to a remote machine it sometimes hangs when using a certain combination of commands on the remote host.

      Steps to Reproduce

      1. Create a SSH task
      2. On the commands define something like that:
        sudo su - user
        ls /tools/eai/stage
        tname=`ls /tools/eai/stage/deployagent*-bin.tar.gz`
        echo $tname
        cd /tools/eai/scripts/deployagent
        rm -vrf * > /dev/null/ 2>&1
        tar xvf $tname > /dev/null 2>&1
        rm $tname > /dev/null 2>&1
        
      3. Run the build

      Expected Results

      Task runs, commands run and finish and the build either succeeds or fails.

      Actual Results

      The build hangs and spins indefinitely.

      Workaround

      Wrap the commands above inside a script and run it like:

      nohup ./yourscript.sh </dev/null>/dev/null 2>&1 &
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tbomfim ThiagoBomfim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: