ImportError: No module named st2common.util.shell when run linux.service
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
SUMMARY
Provide a quick summary of your bug report.
st2 run linux.service service=mongod act=restart hosts=agentavtone-worker1
...
id: 5f191803f06137c07014deb3
action.ref: linux.service
context.user: st2admin
parameters:
act: restart
hosts: agentavtone-worker1
service: mongod
status: failed
start_timestamp: Thu, 23 Jul 2020 04:54:27 UTC
end_timestamp: Thu, 23 Jul 2020 04:54:33 UTC
result:
agentavtone-worker1:
failed: true
return_code: 1
stderr: "0: 2 windows (created Thu Jul 9 00:06:22 2020)
1: 1 windows (created Tue Jul 21 20:58:59 2020)
Traceback (most recent call last):
File "/tmp/5f191803f06137c07014deb2/service.py", line 23, in <module>
from st2common.util.shell import quote_unix
ImportError: No module named st2common.util.shell"
stdout: ''
succeeded: false
STACKSTORM VERSION
Paste the output of st2 --version:
st2 3.2.0, on Python 2.7.5
OS, environment, install method
Post what OS you are running this on, along with any other relevant information/
- e.g. Docker, Vagrant, Kubernetes, etc. Describe how you installed ST2
- e.g. one-line install, custom install, etc -->
one-line install
Steps to reproduce the problem
Show how to reproduce the problem, using a minimal test-case. Make sure to include any content
(pack content - workflows, actions, etc.) which are needed to reproduce the problem.
Expected Results
What did you expect to happen when running the steps above?
Actual Results
What happened? What output did you get?
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linux.service action and the generated /tmp/5f191803f06137c07014deb2/service.py at line 23, where it imports st2common.util.shell. Reproduce the shown st2 run command and inspect why that module is unavailable in the action runtime. Done means the action runs without this ImportError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100