Pack install fails

packs
proxy

(Mohan L) #1

I am following doc to configure proxy: Packs — StackStorm 2.7.2 documentation

I am getting the following error while trying to install pack locally.

Exception: Failed to install requirement "six>=1.9.0,<2.0": Collecting six<2.0,>=1.9.0

Ahy help will be really appreciated.

# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)

# python --version
Python 2.7.5

# st2 --version
st2 2.6.0

# cat /etc/sysconfig/st2actionrunner 
http_proxy=http://proxy.myproxy.com:8080/  
https_proxy=http://proxy.myproxy.com:8080/
no_proxy=localhost,127.0.0.1

# cat /etc/sysconfig/st2api
http_proxy=http://proxy.myproxy.com:8080/
https_proxy=http://proxy.myproxy.com:8080/
no_proxy=localhost,127.0.0.1
# st2 pack install file:///${PWD}/stackstorm-activedirectory

        [ succeeded ] download pack
        [ succeeded ] make a prerun
        [  failed   ] install pack dependencies

id: 5afca21ed432e54446c19c3b
action.ref: packs.install
parameters:
  packs:
  - file:////root/stackstorm-activedirectory
status: failed
result_task: install pack dependencies
result:
  exit_code: 1
  result: None
  stderr: "st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Using proxy http://proxy.myproxy.com:8080/
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Setting up virtualenv for pack "activedirectory" (/opt/stackstorm/packs/activedirectory)
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Removing virtualenv in "/opt/stackstorm/virtualenvs/activedirectory"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Creating virtualenv for pack "activedirectory" in "/opt/stackstorm/virtualenvs/activedirectory"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Creating virtualenv in "/opt/stackstorm/virtualenvs/activedirectory" using Python binary "/opt/stackstorm/st2/bin/python"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Running command "/opt/stackstorm/st2/bin/virtualenv -p /opt/stackstorm/st2/bin/python /opt/stackstorm/virtualenvs/activedirectory" to create virtualenv.
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Installing base requirements
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Installing requirement six>=1.9.0,<2.0 with command /opt/stackstorm/virtualenvs/activedirectory/bin/pip --proxy http://proxy.myproxy.com:8080/ --proxy http://proxy.myproxy.com:8080/ install six>=1.9.0,<2.0.
Traceback (most recent call last):
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 278, in <module>
    obj.run()
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 171, in run
    output = action.run(**self._parameters)
  File "/opt/stackstorm/packs/packs/actions/pack_mgmt/setup_virtualenv.py", line 88, in run
    proxy_config=self.proxy_config)
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/virtualenvs.py", line 90, in setup_pack_virtualenv
    proxy_config=proxy_config, logger=logger)
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/virtualenvs.py", line 259, in install_requirement
    (requirement, stdout))
Exception: Failed to install requirement "six>=1.9.0,<2.0": Collecting six<2.0,>=1.9.0

"
  stdout: ''
error: st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Using proxy http://proxy.myproxy.com:8080/
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Setting up virtualenv for pack "activedirectory" (/opt/stackstorm/packs/activedirectory)
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Removing virtualenv in "/opt/stackstorm/virtualenvs/activedirectory"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Creating virtualenv for pack "activedirectory" in "/opt/stackstorm/virtualenvs/activedirectory"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Creating virtualenv in "/opt/stackstorm/virtualenvs/activedirectory" using Python binary "/opt/stackstorm/st2/bin/python"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Running command "/opt/stackstorm/st2/bin/virtualenv -p /opt/stackstorm/st2/bin/python /opt/stackstorm/virtualenvs/activedirectory" to create virtualenv.
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Installing base requirements
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG    Installing requirement six>=1.9.0,<2.0 with command /opt/stackstorm/virtualenvs/activedirectory/bin/pip --proxy http://proxy.myproxy.com:8080/ --proxy http://proxy.myproxy.com:8080/ install six>=1.9.0,<2.0.
Traceback (most recent call last):
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 278, in <module>
    obj.run()
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/runners/python_action_wrapper.py", line 171, in run
    output = action.run(**self._parameters)
  File "/opt/stackstorm/packs/packs/actions/pack_mgmt/setup_virtualenv.py", line 88, in run
    proxy_config=self.proxy_config)
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/virtualenvs.py", line 90, in setup_pack_virtualenv
    proxy_config=proxy_config, logger=logger)
  File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/virtualenvs.py", line 259, in install_requirement
    (requirement, stdout))
Exception: Failed to install requirement "six>=1.9.0,<2.0": Collecting six<2.0,>=1.9.0


traceback: None
failed_on: install pack dependencies
start_timestamp: Wed, 16 May 2018 21:26:54 UTC
end_timestamp: Wed, 16 May 2018 21:27:49 UTC
+--------------------------+------------------------+--------------------------+-------------------------+--------------------------+
| id                       | status                 | task                     | action                  | start_timestamp          |
+--------------------------+------------------------+--------------------------+-------------------------+--------------------------+
| 5afca21fd432e5449facf332 | succeeded (4s elapsed) | download pack            | packs.download          | Wed, 16 May 2018         |
|                          |                        |                          |                         | 21:26:55 UTC             |
| 5afca224d432e5449facf334 | succeeded (2s elapsed) | make a prerun            | packs.virtualenv_prerun | Wed, 16 May 2018         |
|                          |                        |                          |                         | 21:27:00 UTC             |
| 5afca227d432e5449facf336 | failed (45s elapsed)   | install pack             | packs.setup_virtualenv  | Wed, 16 May 2018         |
|                          |                        | dependencies             |                         | 21:27:03 UTC             |
+--------------------------+------------------------+--------------------------+-------------------------+--------------------------+

(Lindsay Hill) #2

First thing I’d recommend is upgrading to 2.7.2. Haven’t gone through all the logs, but I suspect you’re being hit by something pip10-related.

There’s some changes in st2 2.7.1 that help with this.


(Revs) #3

Thanks for the link. I have gone through it and files mentioned in that link are missing in my setup.
/etc/sysconfig/st2actionrunner and /etc/sysconfig/st2api.

We have stackstorm on RHEL6.9 and below are the versions.

[r****@z***** ~]$ st2 --version
st2 2.7.1, on Python 2.7

Please direct.

Thanks.


(Lindsay Hill) #4

If they don’t exist, you need to create them.

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/deployment_guide/ch-sysconfig