StackStorm / st2

StackStorm (aka "IFTTT for Ops") is event-driven automation for auto-remediation, incident responses, troubleshooting, deployments, and more for DevOps and SREs. Includes rules engine, workflow, 160 integration packs with 6000+ actions (see https://exchange.stackstorm.org) and ChatOps. Installer at https://docs.stackstorm.com/install/index.html
https://stackstorm.com/
Apache License 2.0
6.04k stars 746 forks source link

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

Open riyu94 opened 6 years ago

riyu94 commented 6 years ago
SUMMARY

Unable to run an action implemented by bin/tcsh (default bash in machine is tcsh), Feature request to specify default shell env as a parameter

ISSUE TYPE
STACKSTORM VERSION
OS / ENVIRONMENT / INSTALL METHOD
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

Kami commented 6 years ago

Right now we only officially support bash.

We have no ETA for tcsh / other shell support at the moment, so a possible workaround for you would be to install bash on your end host / container (if possible).

EDIT: It looks like bash is already available in that container. So a possible workaround would be to change shell for that user to /bin/bash.

blag commented 5 years ago

Just to make it explicit: StackStorm does not currently support the csh, tcsh, ksh, or fish shells.

It might work for zsh shells, but only because zsh is largely backwards compatible with bash. There is absolutely no guarantee that StackStorm will work with zsh. We do not know if it will work with zsh, and we do not run our tests with zsh. If you use zsh you are on your own.