Unable to run an action implemented by bin/tcsh (default bash in machine is tcsh)


(Riya Punjabi) #1
SUMMARY

Unable to run an action implemented by bin/tcsh (default bash in machine is tcsh)

ISSUE TYPE
  • Bug Report
STACKSTORM VERSION
  • st2 2.8.1, on Python 2.7.6
OS / ENVIRONMENT / INSTALL METHOD
  • Docker
STEPS TO REPRODUCE

st2 run core.remote cmd=whoami hosts=machinename username=user password=password

EXPECTED RESULTS

Should have shown the result for whoami, as works with root where deafult bash env is /bin/bash

ACTUAL RESULTS
id: 5b73712822156301b4c37a24
status: failed
parameters:
cmd: whoami
hosts: mahinename
password: '********'
username: user
result:
machinename:
failed: true
return_code: 1
stderr: 'export: Command not found.'
stdout: ''
succeeded: false

Not able to run the bash command, because the shell env is bin/tcsh
Could a feature be added to specify the shell env??? would be great help.
Thank you


(Lindsay Hill) #2

Not able to run the bash command, because the shell env is bin/tcsh

That’s not just the shell environment - that’s the shell itself.

You could probably look through the code and see if there’s a way of handling this differently, but I suspect it’s non-trivial to update, and add test cases, and handle any arbitrary shell. Probably not going to be a high priority for anyone else