Sorry, please see below. No proxy, and we can only to certain sites.
st2 --debug pack install st2
2019-03-25 09:26:07,163 DEBUG - Cached token from file "/root/.st2/token-st2admin" has expired
# -------- begin 140466323157136 request ----------
curl -X POST -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-requests/2.14.2' -H 'content-type: application/json' -H 'Content-Length: 2' -H 'Authorization: Basic c3QyYWRtaW46Q2hAbmdlTWU=' --data-binary '{}' http://127.0.0.1:9100/tokens
# -------- begin 140466323157136 response ----------
{
"service": false,
"expiry": "2019-03-26T13:26:07.182619Z",
"token": "71e1477bf2e24094adb7ec7ef28361d7",
"user": "st2admin",
"id": "5c98d6ef1fd11047002075d4",
"metadata": {}
}
# -------- end 140466323157136 response ------------
2019-03-25 09:26:07,194 DEBUG - Token has been cached in "/root/.st2/token-st2admin"
# -------- begin 140466323040784 request ----------
curl -X POST -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-requests/2.14.2' -H 'content-type: application/json' -H 'X-Auth-Token: 71e1477bf2e24094adb7ec7ef28361d7' -H 'Content-Length: 15' --data-binary '{"pack": "st2"}' http://127.0.0.1:9101/v1/packs/index/search
# -------- begin 140466323040784 response ----------
{
"description": "StackStorm utility actions and aliases",
"author": "StackStorm, Inc.",
"email": "[email protected]",
"content": {
"actions": {
"count": 16,
"resources": [
"actions.list",
"call_home",
"check_permissions_anon_data",
"executions.get",
"executions.list",
"executions.re_run",
"inquiry.respond",
"kv.delete",
"kv.get",
"kv.get_object",
"kv.grep",
"kv.set",
"kv.set_object",
"rules.list",
"sensors.list",
"upload_to_s3"
]
},
"aliases": {
"count": 7,
"resources": [
"st2_actions_list",
"st2_executions_get",
"st2_executions_list",
"st2_executions_re_run",
"st2_inquiry_respond",
"st2_rules_list",
"st2_sensors_list"
]
}
},
"version": "1.0.4",
"repo_url": "https://github.com/StackStorm-Exchange/stackstorm-st2",
"ref": "st2",
"python_versions": [
"2",
"3"
],
"name": "st2"
}
# -------- end 140466323040784 response ------------
For the "st2" pack, the following content will be registered:
rules | 0
sensors | 0
triggers | 0
actions | 16
aliases | 7
Installation may take a while for packs with many items.
# -------- begin 140466323040784 request ----------
curl -X POST -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-requests/2.14.2' -H 'content-type: application/json' -H 'X-Auth-Token: 71e1477bf2e24094adb7ec7ef28361d7' -H 'Content-Length: 52' --data-binary '{"force": false, "python3": false, "packs": ["st2"]}' http://127.0.0.1:9101/v1/packs/install
# -------- begin 140466323040784 response ----------
{
"execution_id": "5c98d6ef1fd1104914e0fcb1"
}
# -------- end 140466323040784 response ------------
[ succeeded ] download pack
[ succeeded ] make a prerun
[ failed ] install pack dependencies
# -------- begin 140466323040208 request ----------
curl -X GET -H 'Connection: keep-alive' -H 'Accept-Encoding: gzip, deflate' -H 'Accept: */*' -H 'User-Agent: python-requests/2.14.2' -H 'X-Auth-Token: 71e1477bf2e24094adb7ec7ef28361d7' 'http://127.0.0.1:9101/v1/executions/5c98d6ef1fd1104914e0fcb1/children/?depth=1'
# -------- begin 140466323040208 response ----------
[
{
"status": "succeeded",
"start_timestamp": "2019-03-25T13:26:07.730834Z",
"log": [
{
"status": "requested",
"timestamp": "2019-03-25T09:26:07.000000Z"
},
{
"status": "scheduled",
"timestamp": "2019-03-25T09:26:07.000000Z"
},
{
"status": "running",
"timestamp": "2019-03-25T09:26:07.000000Z"
},
{
"status": "succeeded",
"timestamp": "2019-03-25T09:26:09.000000Z"
}
],
"parameters": {
"force": false,
"packs": [
"st2"
]
},
"runner": {
"runner_module": "python_runner",
"uid": "runner_type:python-script",
"runner_package": "python_runner",
"description": "A runner for launching python actions.",
"enabled": true,
"output_key": "result",
"output_schema": {
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array"
},
{
"type": "null"
}
]
},
"exit_code": {
"required": true,
"type": "integer"
},
"stderr": {
"required": true,
"type": "string"
},
"stdout": {
"required": true,
"type": "string"
}
},
"runner_parameters": {
"debug": {
"default": false,
"required": false,
"type": "boolean",
"description": "Enable runner debug mode."
},
"content_version": {
"required": false,
"type": "string",
"description": "Git revision of the pack content to use for this action execution (git commit sha / tag / branch). Only applies to packs which are git repositories."
},
"log_level": {
"default": "DEBUG",
"enum": [
"AUDIT",
"CRITICAL",
"ERROR",
"WARNING",
"INFO",
"DEBUG"
],
"type": "string",
"description": "Default log level for Python runner actions."
},
"timeout": {
"default": 600,
"type": "integer",
"description": "Action timeout in seconds. Action will get killed if it doesn't finish in timeout seconds."
},
"env": {
"type": "object",
"description": "Environment variables which will be available to the script."
}
},
"id": "5c98c5cf1fd11045db9f692b",
"name": "python-script"
},
"elapsed_seconds": 1.894602,
"web_url": "https://hld00113.corpads.local/#/history/5c98d6ef1fd110499041fde0/general",
"parent": "5c98d6ef1fd1104914e0fcb1",
"result": {
"result": {
"st2": "Success."
},
"exit_code": 0,
"stderr": "st2.actions.python.DownloadGitRepoAction: DEBUG Removing existing pack st2 in /opt/stackstorm/packs/st2 to replace.\nst2.actions.python.DownloadGitRepoAction: DEBUG Moving pack from /root/f50b4e5a9d30609142e64f9983c68d77 to /opt/stackstorm/packs/.\n",
"stdout": ""
},
"context": {
"parent": {
"user": "st2admin",
"execution_id": "5c98d6ef1fd1104914e0fcb1",
"pack": "packs"
},
"user": "st2admin",
"chain": {
"name": "download pack",
"parameters": {
"force": "{{force}}",
"packs": "{{packs}}"
},
"publish": null,
"params": null,
"notify": null,
"on_failure": null,
"ref": "packs.download",
"on_success": "make a prerun"
},
"pack": "packs"
},
"action": {
"description": "Downloads packs and places it in the local content repository.",
"runner_type": "python-script",
"tags": [],
"enabled": true,
"metadata_file": "actions/download.yaml",
"pack": "packs",
"entry_point": "pack_mgmt/download.py",
"notify": {},
"output_schema": {},
"uid": "action:packs:download",
"parameters": {
"force": {
"default": false,
"required": false,
"type": "boolean",
"description": "Set to True to force install the pack and skip StackStorm version compatibility check"
},
"abs_repo_base": {
"default": "/opt/stackstorm/packs/",
"type": "string",
"immutable": true
},
"verifyssl": {
"default": true,
"type": "boolean"
},
"packs": {
"items": {
"type": "string"
},
"required": true,
"type": "array"
}
},
"ref": "packs.download",
"id": "5c98c5d21fd110475400ffc4",
"name": "download"
},
"liveaction": {
"runner_info": {
"hostname": "hld00113",
"pid": 18842
},
"parameters": {
"force": false,
"packs": [
"st2"
]
},
"action_is_workflow": false,
"callback": {},
"action": "packs.download",
"id": "5c98d6ef1fd110499041fddf"
},
"id": "5c98d6ef1fd110499041fde0",
"end_timestamp": "2019-03-25T13:26:09.625436Z"
},
{
"status": "succeeded",
"start_timestamp": "2019-03-25T13:26:09.853918Z",
"log": [
{
"status": "requested",
"timestamp": "2019-03-25T09:26:09.000000Z"
},
{
"status": "scheduled",
"timestamp": "2019-03-25T09:26:10.000000Z"
},
{
"status": "running",
"timestamp": "2019-03-25T09:26:10.000000Z"
},
{
"status": "succeeded",
"timestamp": "2019-03-25T09:26:10.000000Z"
}
],
"parameters": {
"packs_status": {
"st2": "Success."
}
},
"runner": {
"runner_module": "python_runner",
"uid": "runner_type:python-script",
"runner_package": "python_runner",
"description": "A runner for launching python actions.",
"enabled": true,
"output_key": "result",
"output_schema": {
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array"
},
{
"type": "null"
}
]
},
"exit_code": {
"required": true,
"type": "integer"
},
"stderr": {
"required": true,
"type": "string"
},
"stdout": {
"required": true,
"type": "string"
}
},
"runner_parameters": {
"debug": {
"default": false,
"required": false,
"type": "boolean",
"description": "Enable runner debug mode."
},
"content_version": {
"required": false,
"type": "string",
"description": "Git revision of the pack content to use for this action execution (git commit sha / tag / branch). Only applies to packs which are git repositories."
},
"log_level": {
"default": "DEBUG",
"enum": [
"AUDIT",
"CRITICAL",
"ERROR",
"WARNING",
"INFO",
"DEBUG"
],
"type": "string",
"description": "Default log level for Python runner actions."
},
"timeout": {
"default": 600,
"type": "integer",
"description": "Action timeout in seconds. Action will get killed if it doesn't finish in timeout seconds."
},
"env": {
"type": "object",
"description": "Environment variables which will be available to the script."
}
},
"id": "5c98c5cf1fd11045db9f692b",
"name": "python-script"
},
"elapsed_seconds": 0.548735,
"web_url": "https://hld00113.corpads.local/#/history/5c98d6f11fd110499041fde2/general",
"parent": "5c98d6ef1fd1104914e0fcb1",
"result": {
"result": [
"st2"
],
"exit_code": 0,
"stderr": "",
"stdout": ""
},
"context": {
"parent": {
"user": "st2admin",
"execution_id": "5c98d6ef1fd1104914e0fcb1",
"pack": "packs"
},
"user": "st2admin",
"chain": {
"name": "make a prerun",
"parameters": {
"packs_status": "{{ __results['download pack'].result }}"
},
"publish": null,
"params": null,
"notify": null,
"on_failure": null,
"ref": "packs.virtualenv_prerun",
"on_success": "install pack dependencies"
},
"pack": "packs"
},
"action": {
"description": "Transformation step to conver packs_status to list of packs.",
"runner_type": "python-script",
"tags": [],
"enabled": true,
"metadata_file": "actions/virtualenv_prerun.yaml",
"pack": "packs",
"entry_point": "pack_mgmt/virtualenv_setup_prerun.py",
"notify": {},
"output_schema": {},
"uid": "action:packs:virtualenv_prerun",
"parameters": {
"packs_status": {
"type": "object"
}
},
"ref": "packs.virtualenv_prerun",
"id": "5c98c5d21fd110475400ffd0",
"name": "virtualenv_prerun"
},
"liveaction": {
"runner_info": {
"hostname": "hld00113",
"pid": 18826
},
"parameters": {
"packs_status": {
"st2": "Success."
}
},
"action_is_workflow": false,
"callback": {},
"action": "packs.virtualenv_prerun",
"id": "5c98d6f11fd110499041fde1"
},
"id": "5c98d6f11fd110499041fde2",
"end_timestamp": "2019-03-25T13:26:10.402653Z"
},
{
"status": "failed",
"start_timestamp": "2019-03-25T13:26:10.959563Z",
"log": [
{
"status": "requested",
"timestamp": "2019-03-25T09:26:10.000000Z"
},
{
"status": "scheduled",
"timestamp": "2019-03-25T09:26:11.000000Z"
},
{
"status": "running",
"timestamp": "2019-03-25T09:26:11.000000Z"
},
{
"status": "failed",
"timestamp": "2019-03-25T09:32:42.000000Z"
}
],
"parameters": {
"python3": false,
"env": null,
"packs": [
"st2"
]
},
"runner": {
"runner_module": "python_runner",
"uid": "runner_type:python-script",
"runner_package": "python_runner",
"description": "A runner for launching python actions.",
"enabled": true,
"output_key": "result",
"output_schema": {
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array"
},
{
"type": "null"
}
]
},
"exit_code": {
"required": true,
"type": "integer"
},
"stderr": {
"required": true,
"type": "string"
},
"stdout": {
"required": true,
"type": "string"
}
},
"runner_parameters": {
"debug": {
"default": false,
"required": false,
"type": "boolean",
"description": "Enable runner debug mode."
},
"content_version": {
"required": false,
"type": "string",
"description": "Git revision of the pack content to use for this action execution (git commit sha / tag / branch). Only applies to packs which are git repositories."
},
"log_level": {
"default": "DEBUG",
"enum": [
"AUDIT",
"CRITICAL",
"ERROR",
"WARNING",
"INFO",
"DEBUG"
],
"type": "string",
"description": "Default log level for Python runner actions."
},
"timeout": {
"default": 600,
"type": "integer",
"description": "Action timeout in seconds. Action will get killed if it doesn't finish in timeout seconds."
},
"env": {
"type": "object",
"description": "Environment variables which will be available to the script."
}
},
"id": "5c98c5cf1fd11045db9f692b",
"name": "python-script"
},
"elapsed_seconds": 391.278579,
"web_url": "https://hld00113.corpads.local/#/history/5c98d6f21fd110499041fde4/general",
"parent": "5c98d6ef1fd1104914e0fcb1",
"result": {
"result": "None",
"exit_code": 1,
"stderr": "st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Setting up virtualenv for pack \"st2\" (/opt/stackstorm/packs/st2)\nst2.actions.python.SetupVirtualEnvironmentAction: DEBUG Removing virtualenv in \"/opt/stackstorm/virtualenvs/st2\"\nst2.actions.python.SetupVirtualEnvironmentAction: DEBUG Creating virtualenv for pack \"st2\" in \"/opt/stackstorm/virtualenvs/st2\"\nst2.actions.python.SetupVirtualEnvironmentAction: DEBUG Creating virtualenv in \"/opt/stackstorm/virtualenvs/st2\" using Python binary \"/opt/stackstorm/st2/bin/python\"\nst2.actions.python.SetupVirtualEnvironmentAction: DEBUG Running command \"/opt/stackstorm/st2/bin/virtualenv -p /opt/stackstorm/st2/bin/python --no-download /opt/stackstorm/virtualenvs/st2\" to create virtualenv.\nst2.actions.python.SetupVirtualEnvironmentAction: DEBUG Installing base requirements\nst2.actions.python.SetupVirtualEnvironmentAction: DEBUG Installing requirement six>=1.9.0,<2.0 with command /opt/stackstorm/virtualenvs/st2/bin/pip install six>=1.9.0,<2.0.\nTraceback (most recent call last):\n File \"/opt/stackstorm/st2/lib/python2.7/site-packages/python_runner/python_action_wrapper.py\", line 325, in <module>\n obj.run()\n File \"/opt/stackstorm/st2/lib/python2.7/site-packages/python_runner/python_action_wrapper.py\", line 184, in run\n output = action.run(**self._parameters)\n File \"/opt/stackstorm/packs/packs/actions/pack_mgmt/setup_virtualenv.py\", line 89, in run\n no_download=no_download)\n File \"/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/virtualenvs.py\", line 102, in setup_pack_virtualenv\n proxy_config=proxy_config, logger=logger)\n File \"/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/virtualenvs.py\", line 304, in install_requirement\n (requirement, stdout))\nException: Failed to install requirement \"six>=1.9.0,<2.0\": Collecting six<2.0,>=1.9.0\n\n",
"stdout": ""
},
"context": {
"parent": {
"user": "st2admin",
"execution_id": "5c98d6ef1fd1104914e0fcb1",
"pack": "packs"
},
"user": "st2admin",
"chain": {
"name": "install pack dependencies",
"parameters": {
"python3": "{{python3}}",
"env": "{{env}}",
"packs": "{{ __results['make a prerun'].result }}"
},
"publish": null,
"params": null,
"notify": null,
"on_failure": null,
"ref": "packs.setup_virtualenv",
"on_success": "register pack"
},
"pack": "packs"
},
"action": {
"description": "Set up virtual environment for the provided packs",
"runner_type": "python-script",
"tags": [],
"enabled": true,
"metadata_file": "actions/setup_virtualenv.yaml",
"pack": "packs",
"entry_point": "pack_mgmt/setup_virtualenv.py",
"notify": {},
"output_schema": {},
"uid": "action:packs:setup_virtualenv",
"parameters": {
"no_download": {
"default": true,
"required": false,
"type": "boolean",
"description": "Use version of pip which is already on the system instead of downloading the latest version from PyPi when creating a virtual environment."
},
"env": {
"default": null,
"required": false,
"type": "object",
"description": "Optional environment variables"
},
"update": {
"default": false,
"type": "boolean",
"description": "Check this option if the virtual environment already exists and if you only want to perform an update and installation of new dependencies. If you don't check this option, the virtual environment will be destroyed then re-created. If you check this and the virtual environment doesn't exist, it will create it."
},
"python3": {
"default": false,
"required": false,
"type": "boolean",
"description": "Use Python 3 binary when creating a virtualenv for this pack."
},
"packs": {
"items": {
"type": "string"
},
"type": "array",
"description": "List of packs to create virtualenv for."
}
},
"ref": "packs.setup_virtualenv",
"id": "5c98c5d21fd110475400ffcb",
"name": "setup_virtualenv"
},
"liveaction": {
"runner_info": {
"hostname": "hld00113",
"pid": 18834
},
"parameters": {
"python3": false,
"env": null,
"packs": [
"st2"
]
},
"action_is_workflow": false,
"callback": {},
"action": "packs.setup_virtualenv",
"id": "5c98d6f21fd110499041fde3"
},
"id": "5c98d6f21fd110499041fde4",
"end_timestamp": "2019-03-25T13:32:42.238142Z"
}
]
# -------- end 140466323040208 response ------------
id: 5c98d6ef1fd1104914e0fcb1
action.ref: packs.install
parameters:
packs:
- st2
python3: false
status: failed
result_task: install pack dependencies
result:
exit_code: 1
result: None
stderr: "st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Setting up virtualenv for pack "st2" (/opt/stackstorm/packs/st2)
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Removing virtualenv in "/opt/stackstorm/virtualenvs/st2"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Creating virtualenv for pack "st2" in "/opt/stackstorm/virtualenvs/st2"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Creating virtualenv in "/opt/stackstorm/virtualenvs/st2" 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 --no-download /opt/stackstorm/virtualenvs/st2" 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/st2/bin/pip install six>=1.9.0,<2.0.
Traceback (most recent call last):
File "/opt/stackstorm/st2/lib/python2.7/site-packages/python_runner/python_action_wrapper.py", line 325, in <module>
obj.run()
File "/opt/stackstorm/st2/lib/python2.7/site-packages/python_runner/python_action_wrapper.py", line 184, in run
output = action.run(**self._parameters)
File "/opt/stackstorm/packs/packs/actions/pack_mgmt/setup_virtualenv.py", line 89, in run
no_download=no_download)
File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/virtualenvs.py", line 102, in setup_pack_virtualenv
proxy_config=proxy_config, logger=logger)
File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/virtualenvs.py", line 304, 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 Setting up virtualenv for pack "st2" (/opt/stackstorm/packs/st2)
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Removing virtualenv in "/opt/stackstorm/virtualenvs/st2"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Creating virtualenv for pack "st2" in "/opt/stackstorm/virtualenvs/st2"
st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Creating virtualenv in "/opt/stackstorm/virtualenvs/st2" 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 --no-download /opt/stackstorm/virtualenvs/st2" 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/st2/bin/pip install six>=1.9.0,<2.0.
Traceback (most recent call last):
File "/opt/stackstorm/st2/lib/python2.7/site-packages/python_runner/python_action_wrapper.py", line 325, in <module>
obj.run()
File "/opt/stackstorm/st2/lib/python2.7/site-packages/python_runner/python_action_wrapper.py", line 184, in run
output = action.run(**self._parameters)
File "/opt/stackstorm/packs/packs/actions/pack_mgmt/setup_virtualenv.py", line 89, in run
no_download=no_download)
File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/virtualenvs.py", line 102, in setup_pack_virtualenv
proxy_config=proxy_config, logger=logger)
File "/opt/stackstorm/st2/lib/python2.7/site-packages/st2common/util/virtualenvs.py", line 304, 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: Mon, 25 Mar 2019 13:26:07 UTC
end_timestamp: Mon, 25 Mar 2019 13:32:43 UTC