StackStorm / StackStorm/st2

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

Open
#4,304 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

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
  • 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the st2 run core.remote invocation and the action implemented by bin/tcsh, then reproduce the failure on an environment whose default shell is tcsh. Trace how the remote action selects and invokes the shell. Done means the whoami command succeeds with a configurable shell environment without breaking the existing bash case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell
Domain
cli, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.