StorminStanley / st2box

3 stars 3 forks source link

Notes on trying this #2

Open sebgoa opened 8 years ago

sebgoa commented 8 years ago
  1. you need to clone the repo, because the compose file builds images from local configuration.
  2. Auth token setup needs work:
api_1             | 2016-03-07 12:24:22,215 INFO [-] 6f625a6b-0bc4-48f0-9b92-7f29a475da10 -  GET /v1/stream with filters={u'x-auth-token': u'06b500cba0034c0e9aae49783ef340d9'} (remote_addr='172.17.0.9',method='GET',filters={u'x-auth-token': u'06b500cba0034c0e9aae49783ef340d9'},request_id='6f625a6b-0bc4-48f0-9b92-7f29a475da10',path='/v1/stream')
api_1             | 2016-03-07 12:24:22,219 AUDIT [-] Token provided in query parameters
api_1             | 2016-03-07 12:24:22,224 ERROR [-] Token is not found.
api_1             | Traceback (most recent call last):
api_1             |   File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pecan/core.py", line 630, in __call__
api_1             |     controller, args, kwargs = self.find_controller(state)
api_1             |   File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pecan/core.py", line 786, in find_controller
api_1             |     controller, args, kw = super(Pecan, self).find_controller(_state)
api_1             |   File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pecan/core.py", line 516, in find_controller
api_1             |     self.handle_hooks(self.determine_hooks(controller), 'before', state)
api_1             |   File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pecan/core.py", line 793, in handle_hooks
api_1             |     return super(Pecan, self).handle_hooks(hooks, *args, **kw)
api_1             |   File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/pecan/core.py", line 320, in handle_hooks
api_1             |     result = getattr(hook, hook_type)(*args)
api_1             |   File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/hooks.py", line 115, in before
api_1             |     user_db = self._validate_creds_and_get_user(request=state.request)
api_1             |   File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/hooks.py", line 203, in _validate_creds_and_get_user
api_1             |     token_in_query_params=token_in_query_params)
api_1             |   File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/util/auth.py", line 60, in validate_token
api_1             |     token = Token.get(token_string)
api_1             |   File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/persistence/auth.py", line 62, in get
api_1             |     raise TokenNotFoundError()
api_1             | TokenNotFoundError
enykeev commented 8 years ago

Seems like 2 is related to the latest changes in st2. I believe I've fixed that during https://github.com/StackStorm/st2/pull/2560/.

As for 1, if I understand you correctly, you would like me to publish this containers. Eventually, we'll do that when container support will became official for st2. For now I'd like to keep building them locally to simplify development process.

sebgoa commented 8 years ago

@enykeev I understand you on first item.

for the auth issue, when I get to the UI it tells me that the server needs authentication. I need to logout and log back in with admin/123 to get in the UI properly.

sebgoa commented 8 years ago

Now the question is how do I install the chatops pack with my Slack token in this setup ? :)

sebgoa commented 8 years ago

picked up the docs in stackstorm/st2chatops but ran into https://github.com/StackStorm/st2chatops/issues/20

sebgoa commented 8 years ago

getting close, running stackstorm-hubot in container in this st2box setup.

but there is a auth problem

$ docker logs 30e6cc31b1b6
[Mon Mar 07 2016 13:53:03 GMT+0000 (UTC)] DEBUG Loading adapter slack
[Mon Mar 07 2016 13:53:03 GMT+0000 (UTC)] INFO Connecting...
[Mon Mar 07 2016 13:53:04 GMT+0000 (UTC)] INFO Logged in as skipbot of skippbox, but not yet connected
[Mon Mar 07 2016 13:53:05 GMT+0000 (UTC)] INFO Slack client now connected
[Mon Mar 07 2016 13:53:05 GMT+0000 (UTC)] DEBUG Loading scripts from /app/scripts
[Mon Mar 07 2016 13:53:05 GMT+0000 (UTC)] DEBUG Loading scripts from /app/src/scripts
[Mon Mar 07 2016 13:53:05 GMT+0000 (UTC)] DEBUG Loading hubot-scripts from /app/node_modules/hubot-scripts/src/scripts
[Mon Mar 07 2016 13:53:05 GMT+0000 (UTC)] DEBUG Loading external-scripts from npm packages
[Mon Mar 07 2016 13:53:05 GMT+0000 (UTC)] INFO Requesting a token...
[Mon Mar 07 2016 13:53:05 GMT+0000 (UTC)] DEBUG Using slack post data handler.
[Mon Mar 07 2016 13:53:05 GMT+0000 (UTC)] DEBUG Parsing help for /app/node_modules/hubot-stackstorm/scripts/stackstorm.js
[Mon Mar 07 2016 13:53:05 GMT+0000 (UTC)] DEBUG Parsing help for /app/node_modules/hubot-help/src/help.coffee
[Mon Mar 07 2016 13:53:05 GMT+0000 (UTC)] ERROR Failed to authenticate: connect ECONNREFUSED 172.17.0.5:443

I think it's trying to auth with the API server (right container IP 172.17.0.5) but the creds admin/123 that I put in the st2chatops.env file don't seem to do the trick.

sebgoa commented 8 years ago

ok so clearly, it needs to be linked with the nginx container...

sebgoa commented 8 years ago

FWIW, you get the user token on the auth container (not the api one, like I tried at first):

$ docker exec -ti st2box_auth_1 st2 auth admin -p 123
+----------+----------------------------------+
| Property | Value                            |
+----------+----------------------------------+
| user     | admin                            |
| token    | f0803a055c374976ae54776ae4366057 |
| expiry   | 2016-03-08T14:43:15.566807Z      |
+----------+----------------------------------+

but I am thinking this token needs to be set as ST2_AUTH_TOKEN in the API container...??

sebgoa commented 8 years ago

so it seems to be a problem with the actionrunner container trying to reach the api on 0.0.0.0:9101

If I run a proxy on this actionrunner container it seems to work better:

root@4186d3cf01d0:/# socat TCP-LISTEN:9101,fork TCP:api:9101
enykeev commented 8 years ago

I dug a little bit and found out that the problem you had with !pack info resulting in

raise ConnectionError(e, request=request)\nrequests.exceptions.ConnectionError: HTTPConnectionPool(host='0.0.0.0', port=9101)

was related not to the packs pack but rather chatops pack that's responsible for formatting the results of the execution to output it back to chat. It seems like you could change https://github.com/StackStorm/st2/blob/master/conf/st2.prod.conf#L39 config variable to point it to http://api:9101/ instead of http://0.0.0.0:9101/. I haven't tried it myself and yet to see how changing the config for all containers might affect st2 operation, but it looks promising.

In the mean time, if you don't want to mess around with config just yet and explore the consequences of the change "the hard way", socat seems like an awesome workaround. I'll get back to the issue after we finish up with packages. Beginning next week, hopefully.

sebgoa commented 8 years ago

the socat hack gets things working partially.

If I install a pack via the UI then:

Also chatops, has a strange behavior:

sebgoa commented 8 years ago

I am going to keep logging my experience here :)

It seems that the chatops.post_result that succeed are executed from user stanley.

But the admin user that gets created and has access to the UI is not permitted to use chatops.post_message...

something to check

sebgoa commented 8 years ago

mistral and announcement runner don't seem to work in this setup (even with a modified st2.conf in the data container).

however the modified st2.conf gives the same result than the hack with socat

enykeev commented 8 years ago

If it's not too big of a hassle, I'd ask you to attach some bits of logs so we can later figure out say what was the problem with !pack deploy not working or why do you think post_message is affected by the user that runs it.

sebgoa commented 8 years ago

@enykeev here is the logs of action runner when trying to execute a chatops.post_message from the UI

The beginning of the logs show a successful chatops.post_result after doing

!st2 list actions

from the Slack channel.

2016-03-09 15:20:56,977 AUDIT [-] Access granted to "stanley" with the token set to expire at "2016-03-10T15:20:56.977224Z". (username=u'stanley',token_expiration='2016-03-10T15:20:56.977224Z')
2016-03-09 15:20:57,082 AUDIT [-] Liveaction completed (liveaction_db={'status': 'succeeded', 'start_timestamp': '2016-03-09 15:20:56.652689+00:00', 'parameters': {u'whisper': False, u'message': u'Found 10 actions:{~}\n\u2022 chatops.format_execution_result - Format an execution result for chatops\n\u2022 chatops.post_message - Post a message to stream for chatops\n\u2022 chatops.post_result - Post an execution result to stream for chatops\n\u2022 core.announcement - Action that broadcasts the announcement to all stream consumers.\n\u2022 core.http - Action that performs an http request.\n\u2022 core.local - Action that executes an arbitrary Linux command on the localhost.\n\u2022 core.local_sudo - Action that executes an arbitrary Linux command on the localhost.\n\u2022 core.noop - Action that does nothing\n\u2022 core.remote - Action to execute arbitrary linux command remotely.\n\u2022 core.remote_sudo - Action to execute arbitrary linux command remotely.\n', u'user': u'sebgoa', u'channel': u'bot'}, 'runner_info': {u'hostname': u'bb60309a30ba', u'pid': 8}, 'callback': {}, 'notify': None, 'result': {u'color': None, u'whisper': False, u'message': u'Found 10 actions:{~}\n\u2022 chatops.format_execution_result - Format an execution result for chatops\n\u2022 chatops.post_message - Post a message to stream for chatops\n\u2022 chatops.post_result - Post an execution result to stream for chatops\n\u2022 core.announcement - Action that broadcasts the announcement to all stream consumers.\n\u2022 core.http - Action that performs an http request.\n\u2022 core.local - Action that executes an arbitrary Linux command on the localhost.\n\u2022 core.local_sudo - Action that executes an arbitrary Linux command on the localhost.\n\u2022 core.noop - Action that does nothing\n\u2022 core.remote - Action to execute arbitrary linux command remotely.\n\u2022 core.remote_sudo - Action to execute arbitrary linux command remotely.\n', u'user': u'sebgoa', u'channel': u'bot'}, 'context': {u'chain': {u'name': u'post_message', u'parameters': {u'whisper': u'{{whisper}}', u'message': u'{{message}}', u'user': u'{{user}}', u'channel': u'{{channel}}'}, u'publish': None, u'params': None, u'notify': None, u'on_failure': None, u'ref': u'chatops.post_message', u'on_success': None}, u'parent': {u'execution_id': u'56e03f562bdbe10008dc1e16', u'trigger_instance': {u'id': u'56e03f562bdbe10008dc1e14', u'name': None}, u'trace_context': {u'id_': u'56e03f55a4a53700086b48eb', u'trace_tag': u'execution-56e03f55a4a53700086b48e9'}, u'rule': {u'id': u'56dff0c83130d30008229950', u'name': u'notify'}, u'user': u'stanley'}, u'user': u'stanley'}, 'action': u'chatops.post_message', 'id': '56e03f58fa8b890008a702c6', 'end_timestamp': '2016-03-09 15:20:57.002561+00:00'})
2016-03-09 15:20:57,960 AUDIT [-] Liveaction completed (liveaction_db={'status': 'succeeded', 'start_timestamp': '2016-03-09 15:20:54.905208+00:00', 'parameters': {u'user': u'sebgoa', u'execution_id': u'56e03f55a4a53700086b48ea', u'channel': u'bot'}, 'runner_info': {u'hostname': u'bb60309a30ba', u'pid': 8}, 'callback': {}, 'notify': None, 'result': {'tasks': [{'name': 'format_execution_result', 'workflow': None, 'created_at': '2016-03-09T15:20:55.501352+00:00', 'updated_at': '2016-03-09T15:20:56.629905+00:00', 'state': u'succeeded', 'result': {u'stdout': u'', u'exit_code': 0, u'stderr': u'', u'result': u'Found 10 actions:{~}\n\u2022 chatops.format_execution_result - Format an execution result for chatops\n\u2022 chatops.post_message - Post a message to stream for chatops\n\u2022 chatops.post_result - Post an execution result to stream for chatops\n\u2022 core.announcement - Action that broadcasts the announcement to all stream consumers.\n\u2022 core.http - Action that performs an http request.\n\u2022 core.local - Action that executes an arbitrary Linux command on the localhost.\n\u2022 core.local_sudo - Action that executes an arbitrary Linux command on the localhost.\n\u2022 core.noop - Action that does nothing\n\u2022 core.remote - Action to execute arbitrary linux command remotely.\n\u2022 core.remote_sudo - Action to execute arbitrary linux command remotely.\n'}, 'id': 'format_execution_result', 'execution_id': '56e03f57fa8b890008a702c4'}, {'name': 'post_message', 'workflow': None, 'created_at': '2016-03-09T15:20:56.636281+00:00', 'updated_at': '2016-03-09T15:20:57.791287+00:00', 'state': u'succeeded', 'result': {u'color': None, u'whisper': False, u'message': u'Found 10 actions:{~}\n\u2022 chatops.format_execution_result - Format an execution result for chatops\n\u2022 chatops.post_message - Post a message to stream for chatops\n\u2022 chatops.post_result - Post an execution result to stream for chatops\n\u2022 core.announcement - Action that broadcasts the announcement to all stream consumers.\n\u2022 core.http - Action that performs an http request.\n\u2022 core.local - Action that executes an arbitrary Linux command on the localhost.\n\u2022 core.local_sudo - Action that executes an arbitrary Linux command on the localhost.\n\u2022 core.noop - Action that does nothing\n\u2022 core.remote - Action to execute arbitrary linux command remotely.\n\u2022 core.remote_sudo - Action to execute arbitrary linux command remotely.\n', u'user': u'sebgoa', u'channel': u'bot'}, 'id': 'post_message', 'execution_id': '56e03f58fa8b890008a702c7'}]}, 'context': {u'trigger_instance': {u'id': u'56e03f562bdbe10008dc1e14', u'name': None}, u'trace_context': {u'id_': u'56e03f55a4a53700086b48eb', u'trace_tag': u'execution-56e03f55a4a53700086b48e9'}, u'rule': {u'id': u'56dff0c83130d30008229950', u'name': u'notify'}, u'user': u'stanley'}, 'action': u'chatops.post_result', 'id': '56e03f562bdbe10008dc1e15', 'end_timestamp': '2016-03-09 15:20:57.806769+00:00'})
2016-03-09 15:23:05,037 AUDIT [-] The status of action execution is changed from requested to scheduled. <LiveAction.id=56e03fd8a4a53700086b48ec, ActionExecution.id=56e03fd8a4a53700086b48ed> (liveaction_db={'status': 'scheduled', 'start_timestamp': '2016-03-09 15:23:04.948629+00:00', 'parameters': {u'message': u'Hey it does not work', u'user': u'sebgoa', u'channel': u'bot'}, 'runner_info': {}, 'callback': {}, 'notify': None, 'result': {}, 'context': {u'trace_context': {}, u'user': u'admin'}, 'action': u'chatops.post_message', 'id': '56e03fd8a4a53700086b48ec', 'end_timestamp': None},action_execution_db={'status': 'scheduled', 'start_timestamp': '2016-03-09 15:23:04.948629+00:00', 'parent': None, 'parameters': {u'message': u'Hey it does not work', u'user': u'sebgoa', u'channel': u'bot'}, 'trigger_type': {}, 'runner': {u'runner_module': u'st2actions.runners.announcementrunner', u'description': u'A runner for emitting an announcement event on the stream.', u'enabled': True, u'runner_parameters': {u'route': {u'default': u'general', u'minLength': 1, u'type': u'string', u'description': u'The routing_key used to route the message to consumers. Might be a list of words, delimited by dots.', u'maxLength': 255}, u'experimental': {u'default': False, u'required': True, u'type': u'boolean', u'description': u'Flag to indicate acknowledment of using experimental runner'}}, u'id': u'56dff0c63130d3000822991c', u'name': u'announcement'}, 'rule': {}, 'children': [], 'trigger_instance': {}, 'trigger': {}, 'result': {}, 'context': {u'trace_context': {}, u'user': u'admin'}, 'action': {u'name': u'post_message', u'parameters': {u'channel': {u'required': True, u'type': u'string', u'description': u'Channel to post to'}, u'color': {u'type': u'string', u'description': u'Color to use for attachment (Slack only)'}, u'whisper': {u'default': False, u'type': u'boolean', u'description': u'Send a private message to user'}, u'route': {u'default': u'chatops'}, u'user': {u'type': u'string', u'description': u'Explicitly notify a user'}, u'message': {u'required': True, u'type': u'string', u'description': u'Message to send.'}, u'experimental': {u'default': True, u'immutable': True}}, u'tags': [], u'description': u'Post a message to stream for chatops', u'enabled': True, u'entry_point': u'', u'notify': {}, u'uid': u'action:chatops:post_message', u'pack': u'chatops', u'ref': u'chatops.post_message', u'id': u'56dff0c83130d3000822993e', u'runner_type': u'announcement'}, 'liveaction': {'action': u'chatops.post_message', 'callback': {}, 'runner_info': {}, 'id': '56e03fd8a4a53700086b48ec', 'parameters': {u'message': u'Hey it does not work', u'user': u'sebgoa', u'channel': u'bot'}}, 'id': '56e03fd8a4a53700086b48ed', 'end_timestamp': None})
2016-03-09 15:23:05,073 INFO [-] The status of action execution is changed from requested to scheduled. <LiveAction.id=56e03fd8a4a53700086b48ec, ActionExecution.id=56e03fd8a4a53700086b48ed>
2016-03-09 15:23:05,189 AUDIT [-] Launching action execution. (liveaction_db={'status': 'running', 'start_timestamp': '2016-03-09 15:23:04.948629+00:00', 'parameters': {u'message': u'Hey it does not work', u'user': u'sebgoa', u'channel': u'bot'}, 'runner_info': {'hostname': 'bb60309a30ba', 'pid': 8}, 'callback': {}, 'notify': None, 'result': {}, 'context': {u'trace_context': {}, u'user': u'admin'}, 'action': u'chatops.post_message', 'id': '56e03fd8a4a53700086b48ec', 'end_timestamp': None},action_execution_db={'status': 'running', 'start_timestamp': '2016-03-09 15:23:04.948629+00:00', 'parent': None, 'parameters': {u'message': u'Hey it does not work', u'user': u'sebgoa', u'channel': u'bot'}, 'trigger_type': {}, 'runner': {u'runner_module': u'st2actions.runners.announcementrunner', u'description': u'A runner for emitting an announcement event on the stream.', u'enabled': True, u'runner_parameters': {u'route': {u'default': u'general', u'minLength': 1, u'type': u'string', u'description': u'The routing_key used to route the message to consumers. Might be a list of words, delimited by dots.', u'maxLength': 255}, u'experimental': {u'default': False, u'required': True, u'type': u'boolean', u'description': u'Flag to indicate acknowledment of using experimental runner'}}, u'id': u'56dff0c63130d3000822991c', u'name': u'announcement'}, 'rule': {}, 'children': [], 'trigger_instance': {}, 'trigger': {}, 'result': {}, 'context': {u'trace_context': {}, u'user': u'admin'}, 'action': {u'name': u'post_message', u'parameters': {u'channel': {u'required': True, u'type': u'string', u'description': u'Channel to post to'}, u'color': {u'type': u'string', u'description': u'Color to use for attachment (Slack only)'}, u'whisper': {u'default': False, u'type': u'boolean', u'description': u'Send a private message to user'}, u'route': {u'default': u'chatops'}, u'user': {u'type': u'string', u'description': u'Explicitly notify a user'}, u'message': {u'required': True, u'type': u'string', u'description': u'Message to send.'}, u'experimental': {u'default': True, u'immutable': True}}, u'tags': [], u'description': u'Post a message to stream for chatops', u'enabled': True, u'entry_point': u'', u'notify': {}, u'uid': u'action:chatops:post_message', u'pack': u'chatops', u'ref': u'chatops.post_message', u'id': u'56dff0c83130d3000822993e', u'runner_type': u'announcement'}, 'liveaction': {'action': u'chatops.post_message', 'callback': {}, 'runner_info': {'hostname': 'bb60309a30ba', 'pid': 8}, 'id': '56e03fd8a4a53700086b48ec', 'parameters': {u'message': u'Hey it does not work', u'user': u'sebgoa', u'channel': u'bot'}}, 'id': '56e03fd8a4a53700086b48ed', 'end_timestamp': None})
2016-03-09 15:23:05,235 INFO [-] Dispatched {~}action_execution: 56e03fd8a4a53700086b48ed / {~}live_action: 56e03fd8a4a53700086b48ec with "running" status.
2016-03-09 15:23:05,242 INFO [-] Dispatching Action to a runner (liveaction_db={'status': 'running', 'start_timestamp': '2016-03-09 15:23:04.948629+00:00', 'parameters': {u'message': u'Hey it does not work', u'user': u'sebgoa', u'channel': u'bot'}, 'runner_info': {'hostname': 'bb60309a30ba', 'pid': 8}, 'callback': {}, 'notify': None, 'result': {}, 'context': {u'trace_context': {}, u'user': u'admin'}, 'action': u'chatops.post_message', 'id': '56e03fd8a4a53700086b48ec', 'end_timestamp': None},runnertype_db={'runner_module': u'st2actions.runners.announcementrunner', 'description': u'A runner for emitting an announcement event on the stream.', 'enabled': True, 'query_module': None, 'runner_parameters': {u'route': {u'default': u'general', u'minLength': 1, u'type': u'string', u'description': u'The routing_key used to route the message to consumers. Might be a list of words, delimited by dots.', u'maxLength': 255}, u'experimental': {u'default': False, u'required': True, u'type': u'boolean', u'description': u'Flag to indicate acknowledment of using experimental runner'}}, 'id': '56dff0c63130d3000822991c', 'name': u'announcement'})
2016-03-09 15:23:05,270 AUDIT [-] Access granted to "admin" with the token set to expire at "2016-03-10T15:23:05.269586Z". (username=u'admin',token_expiration='2016-03-10T15:23:05.269586Z')
2016-03-09 15:23:05,272 ERROR [-] Failed to run action.
Traceback (most recent call last):
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2actions/container/base.py", line 98, in _do_run
    (status, result, context) = runner.run(action_params)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2actions/runners/announcementrunner.py", line 55, in run
    trace_context=trace_context)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/transport/announcement.py", line 61, in dispatch
    assert isinstance(trace_context, (type(None), TraceContext))
AssertionError
2016-03-09 15:23:05,364 AUDIT [-] Liveaction completed (liveaction_db={'status': 'failed', 'start_timestamp': '2016-03-09 15:23:04.948629+00:00', 'parameters': {u'message': u'Hey it does not work', u'user': u'sebgoa', u'channel': u'bot'}, 'runner_info': {u'hostname': u'bb60309a30ba', u'pid': 8}, 'callback': {}, 'notify': None, 'result': {'traceback': '  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2actions/container/base.py", line 98, in _do_run\n    (status, result, context) = runner.run(action_params)\n  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2actions/runners/announcementrunner.py", line 55, in run\n    trace_context=trace_context)\n  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2common/transport/announcement.py", line 61, in dispatch\n    assert isinstance(trace_context, (type(None), TraceContext))\n', 'error': ''}, 'context': {u'trace_context': {}, u'user': u'admin'}, 'action': u'chatops.post_message', 'id': '56e03fd8a4a53700086b48ec', 'end_timestamp': '2016-03-09 15:23:05.283775+00:00'})

This second log, shows errors when trying to install a pack from Slack with !pack deploy

2016-03-09 15:26:57,039 AUDIT [-] The status of action execution is changed from requested to scheduled. <LiveAction.id=56e040c0a4a53700086b48ef, ActionExecution.id=56e040c0a4a53700086b48f0> (liveaction_db={'status': 'scheduled', 'start_timestamp': '2016-03-09 15:26:56.922258+00:00', 'parameters': {u'packs': [u'google'], u'branch': u'master', u'repo_name': u'stackstorm/st2contrib'}, 'runner_info': {}, 'callback': {}, 'notify': 'NotifySchema@79473552(on_complete="NotificationSubSchema@79473168(message="None", data="{u\'user\': u\'sebgoa\', u\'source_channel\': u\'bot\'}", routes="[u\'hubot\']", [**deprecated**]channels="[u\'notify.default\']")", on_success="None", on_failure="None")', 'result': {}, 'context': {u'action_alias_ref': {u'id': u'56dff0c83130d30008229951', u'name': u'deploy_pack'}, u'user': u'admin', u'api_user': u'sebgoa', u'source_channel': u'bot'}, 'action': u'packs.deploy', 'id': '56e040c0a4a53700086b48ef', 'end_timestamp': None},action_execution_db={'status': 'scheduled', 'start_timestamp': '2016-03-09 15:26:56.922258+00:00', 'parent': None, 'parameters': {u'repo_name': u'stackstorm/st2contrib', u'branch': u'master', u'packs': [u'google']}, 'trigger_type': {}, 'runner': {u'runner_module': u'st2actions.runners.mistral.v2', u'name': u'mistral-v2', u'enabled': True, u'query_module': u'st2actions.query.mistral.v2', u'runner_parameters': {u'skip_notify': {u'default': [], u'type': u'array', u'description': u'List of tasks to skip notifications for.'}, u'task': {u'type': u'string', u'description': u'The name of the task to run for reverse workflow.'}, u'context': {u'default': {}, u'type': u'object', u'description': u'Additional workflow inputs.'}, u'workflow': {u'type': u'string', u'description': u'The name of the workflow to run if the entry_point is a workbook of many workflows. The name should be in the format "<pack_name>.<action_name>.<workflow_name>". If entry point is a workflow or a workbook with a single workflow, the runner will identify the workflow automatically.'}}, u'id': u'56dff0c63130d30008229918', u'description': u'A runner for executing mistral v2 workflow.'}, 'rule': {}, 'children': [], 'trigger_instance': {}, 'trigger': {}, 'result': {}, 'context': {u'action_alias_ref': {u'id': u'56dff0c83130d30008229951', u'name': u'deploy_pack'}, u'user': u'admin', u'api_user': u'sebgoa', u'source_channel': u'bot'}, 'action': {u'name': u'deploy', u'parameters': {u'skip_notify': {u'default': [u'expand_git_url', u'packs_install', u'deloyment_success']}, u'auto_deploy': {u'default': False, u'type': u'boolean', u'description': u'Should this pack and branch be evulated for auto deployment.'}, u'author': {u'default': None, u'type': u'string', u'description': u'The author of the commit'}, u'workflow': {u'default': u'packs.deploy.entry', u'type': u'string', u'immutable': True}, u'packs': {u'required': True, u'type': u'array', u'description': u'The Pack(s) to deploy.'}, u'branch': {u'required': True, u'type': u'string', u'description': u'The Branch to deploy.'}, u'message': {u'default': None, u'type': u'string', u'description': u'The message for the commit'}, u'repo_name': {u'required': True, u'type': u'string', u'description': u'The name of the repository to expand into an Git URL.'}}, u'tags': [], u'description': u'Deploy StackStorm Pack(s)', u'enabled': True, u'entry_point': u'workflows/deploy.yaml', u'notify': {}, u'uid': u'action:packs:deploy', u'pack': u'packs', u'ref': u'packs.deploy', u'id': u'56dff0c83130d30008229942', u'runner_type': u'mistral-v2'}, 'liveaction': {'action': u'packs.deploy', 'callback': {}, 'runner_info': {}, 'id': '56e040c0a4a53700086b48ef', 'parameters': {u'repo_name': u'stackstorm/st2contrib', u'branch': u'master', u'packs': [u'google']}}, 'id': '56e040c0a4a53700086b48f0', 'end_timestamp': None})
2016-03-09 15:26:57,118 INFO [-] The status of action execution is changed from requested to scheduled. <LiveAction.id=56e040c0a4a53700086b48ef, ActionExecution.id=56e040c0a4a53700086b48f0>
2016-03-09 15:26:57,244 AUDIT [-] Launching action execution. (liveaction_db={'status': 'running', 'start_timestamp': '2016-03-09 15:26:56.922258+00:00', 'parameters': {u'packs': [u'google'], u'branch': u'master', u'repo_name': u'stackstorm/st2contrib'}, 'runner_info': {'hostname': 'bb60309a30ba', 'pid': 8}, 'callback': {}, 'notify': 'NotifySchema@79474384(on_complete="NotificationSubSchema@79471952(message="None", data="{u\'user\': u\'sebgoa\', u\'source_channel\': u\'bot\'}", routes="[u\'hubot\']", [**deprecated**]channels="[u\'notify.default\']")", on_success="None", on_failure="None")', 'result': {}, 'context': {u'action_alias_ref': {u'id': u'56dff0c83130d30008229951', u'name': u'deploy_pack'}, u'user': u'admin', u'api_user': u'sebgoa', u'source_channel': u'bot'}, 'action': u'packs.deploy', 'id': '56e040c0a4a53700086b48ef', 'end_timestamp': None},action_execution_db={'status': 'running', 'start_timestamp': '2016-03-09 15:26:56.922258+00:00', 'parent': None, 'parameters': {u'repo_name': u'stackstorm/st2contrib', u'branch': u'master', u'packs': [u'google']}, 'trigger_type': {}, 'runner': {u'runner_module': u'st2actions.runners.mistral.v2', u'name': u'mistral-v2', u'enabled': True, u'query_module': u'st2actions.query.mistral.v2', u'runner_parameters': {u'skip_notify': {u'default': [], u'type': u'array', u'description': u'List of tasks to skip notifications for.'}, u'task': {u'type': u'string', u'description': u'The name of the task to run for reverse workflow.'}, u'context': {u'default': {}, u'type': u'object', u'description': u'Additional workflow inputs.'}, u'workflow': {u'type': u'string', u'description': u'The name of the workflow to run if the entry_point is a workbook of many workflows. The name should be in the format "<pack_name>.<action_name>.<workflow_name>". If entry point is a workflow or a workbook with a single workflow, the runner will identify the workflow automatically.'}}, u'id': u'56dff0c63130d30008229918', u'description': u'A runner for executing mistral v2 workflow.'}, 'rule': {}, 'children': [], 'trigger_instance': {}, 'trigger': {}, 'result': {}, 'context': {u'action_alias_ref': {u'id': u'56dff0c83130d30008229951', u'name': u'deploy_pack'}, u'user': u'admin', u'api_user': u'sebgoa', u'source_channel': u'bot'}, 'action': {u'name': u'deploy', u'parameters': {u'skip_notify': {u'default': [u'expand_git_url', u'packs_install', u'deloyment_success']}, u'auto_deploy': {u'default': False, u'type': u'boolean', u'description': u'Should this pack and branch be evulated for auto deployment.'}, u'author': {u'default': None, u'type': u'string', u'description': u'The author of the commit'}, u'workflow': {u'default': u'packs.deploy.entry', u'type': u'string', u'immutable': True}, u'packs': {u'required': True, u'type': u'array', u'description': u'The Pack(s) to deploy.'}, u'branch': {u'required': True, u'type': u'string', u'description': u'The Branch to deploy.'}, u'message': {u'default': None, u'type': u'string', u'description': u'The message for the commit'}, u'repo_name': {u'required': True, u'type': u'string', u'description': u'The name of the repository to expand into an Git URL.'}}, u'tags': [], u'description': u'Deploy StackStorm Pack(s)', u'enabled': True, u'entry_point': u'workflows/deploy.yaml', u'notify': {}, u'uid': u'action:packs:deploy', u'pack': u'packs', u'ref': u'packs.deploy', u'id': u'56dff0c83130d30008229942', u'runner_type': u'mistral-v2'}, 'liveaction': {'action': u'packs.deploy', 'callback': {}, 'runner_info': {'hostname': 'bb60309a30ba', 'pid': 8}, 'id': '56e040c0a4a53700086b48ef', 'parameters': {u'repo_name': u'stackstorm/st2contrib', u'branch': u'master', u'packs': [u'google']}}, 'id': '56e040c0a4a53700086b48f0', 'end_timestamp': None})
2016-03-09 15:26:57,320 INFO [-] Dispatched {~}action_execution: 56e040c0a4a53700086b48f0 / {~}live_action: 56e040c0a4a53700086b48ef with "running" status.
2016-03-09 15:26:57,327 INFO [-] Dispatching Action to a runner (liveaction_db={'status': 'running', 'start_timestamp': '2016-03-09 15:26:56.922258+00:00', 'parameters': {u'packs': [u'google'], u'branch': u'master', u'repo_name': u'stackstorm/st2contrib'}, 'runner_info': {'hostname': 'bb60309a30ba', 'pid': 8}, 'callback': {}, 'notify': 'NotifySchema@79474384(on_complete="NotificationSubSchema@79471952(message="None", data="{u\'user\': u\'sebgoa\', u\'source_channel\': u\'bot\'}", routes="[u\'hubot\']", [**deprecated**]channels="[u\'notify.default\']")", on_success="None", on_failure="None")', 'result': {}, 'context': {u'action_alias_ref': {u'id': u'56dff0c83130d30008229951', u'name': u'deploy_pack'}, u'user': u'admin', u'api_user': u'sebgoa', u'source_channel': u'bot'}, 'action': u'packs.deploy', 'id': '56e040c0a4a53700086b48ef', 'end_timestamp': None},runnertype_db={'runner_module': u'st2actions.runners.mistral.v2', 'description': u'A runner for executing mistral v2 workflow.', 'enabled': True, 'query_module': u'st2actions.query.mistral.v2', 'runner_parameters': {u'skip_notify': {u'default': [], u'type': u'array', u'description': u'List of tasks to skip notifications for.'}, u'task': {u'type': u'string', u'description': u'The name of the task to run for reverse workflow.'}, u'context': {u'default': {}, u'type': u'object', u'description': u'Additional workflow inputs.'}, u'workflow': {u'type': u'string', u'description': u'The name of the workflow to run if the entry_point is a workbook of many workflows. The name should be in the format "<pack_name>.<action_name>.<workflow_name>". If entry point is a workflow or a workbook with a single workflow, the runner will identify the workflow automatically.'}}, 'id': '56dff0c63130d30008229918', 'name': u'mistral-v2'})
2016-03-09 15:26:57,374 AUDIT [-] Access granted to "admin" with the token set to expire at "2016-03-10T15:26:57.374009Z". (username=u'admin',token_expiration='2016-03-10T15:26:57.374009Z')
2016-03-09 15:26:57,391 INFO [-] Starting new HTTP connection (1): 127.0.0.1
2016-03-09 15:26:57,394 WARNING [-] Determining if <class 'requests.exceptions.ConnectionError'> should be retried...
2016-03-09 15:26:57,394 WARNING [-] Retrying Mistral API invocation on exception type <class 'requests.exceptions.ConnectionError'>.
2016-03-09 15:26:59,397 INFO [-] Starting new HTTP connection (1): 127.0.0.1
2016-03-09 15:26:59,398 WARNING [-] Determining if <class 'requests.exceptions.ConnectionError'> should be retried...
2016-03-09 15:26:59,398 WARNING [-] Retrying Mistral API invocation on exception type <class 'requests.exceptions.ConnectionError'>.
2016-03-09 15:27:03,401 INFO [-] Starting new HTTP connection (1): 127.0.0.1
2016-03-09 15:27:03,402 WARNING [-] Determining if <class 'requests.exceptions.ConnectionError'> should be retried...
2016-03-09 15:27:03,402 WARNING [-] Retrying Mistral API invocation on exception type <class 'requests.exceptions.ConnectionError'>.
2016-03-09 15:27:11,405 INFO [-] Starting new HTTP connection (1): 127.0.0.1
2016-03-09 15:27:11,407 WARNING [-] Determining if <class 'requests.exceptions.ConnectionError'> should be retried...
2016-03-09 15:27:11,407 WARNING [-] Retrying Mistral API invocation on exception type <class 'requests.exceptions.ConnectionError'>.

packs.install from the UI works fine.

The only difference that obvious to a stackstorm newbie like me is that the packs.deploy is a mistral-v2 workflow whereas the packs.install is an action-chain. So there might be some differences between those in terms of network awareness (IP vs DNS name of API server...).