winrm or requests is not installed: No module named six
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
SUMMARY
we have created stacktstorm rule for to start a process.
But we are facing below error while executing
FAILED! => {"msg": "winrm or requests is not installed: No module named six"}
root@*****:~# curl --noproxy -v -k -X POST https://127.0.0.1/api/v1/webhooks/hpom -H "St2-Api-Key:Yjk1NjEyMTZkMjVhZTYwZWI4ZWUwZDM4Yjc5MTFlNzU4M2ZjMmUwYjZiM2M1ZTQxMjhhZTVhNGQ5NWY4OWI4Mw" -H "Content-Type: application/json" --data '{"alert": "win_process_failed", "service":"Spooler", "hosts": "hostanme"}'
ISSUE TYPE
root@ubuntu16:~#
FAILED! => {"msg": "winrm or requests is not installed: No module named six"}
STACKSTORM VERSION
[root@****** ~]# st2 --version
st2 3.0.1, on Python 2.7.5
OS / ENVIRONMENT / INSTALL METHOD
Red Hat Enterprise Linux Server release 7.6 (Maipo)
STEPS TO REPRODUCE
curl --noproxy -v -k -X POST https://127.0.0.1/api/v1/webhooks/hpom -H "St2-Api-Key:ODcyNGM3ZDdiZjg1YTUyYmRjNmIxY2UzZjQxZGI2NjNlNmNiNTc1ZTI0ZjFkNmYzYzc3NzdmYmYwZGU4NzcyOA" -H "Content-Type: application/json" --data '{"alert": "win_process_failed", "service":"Spooler", "hosts": "hostname"}'
EXPECTED RESULTS
stackstrom rule should execute without error.
ACTUAL RESULTS
[root@------ ~]# st2 execution get 5dd7c3aee8182dacec89db78
id: 5dd7c3aee8182dacec89db78
status: failed (2s elapsed)
parameters:
cmd: ansible-playbook /etc/ansible/pb-win-restart-service.yml -e 'service=Spooler hosts=hostname'
result:
failed: true
return_code: 2
stderr: ' [WARNING]: Found variable using reserved name: hosts'
stdout: "
PLAY [-------] **********************************
TASK [Restart a service] *******************************************************
fatal: [----]: FAILED! => {"msg": "winrm or requests is not installed: No module named six"}
PLAY RECAP *********************************************************************
---------- : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
"
succeeded: false
[root@----- ~]#
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 by inspecting the failing st2 execution command and /etc/ansible/pb-win-restart-service.yml, then check the Python dependencies used for winrm and requests, including six. Reproduce the webhook-triggered playbook run and consider the issue resolved when the Windows service restart completes without the missing-module error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible, python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100