StackStorm / st2

StackStorm (aka "IFTTT for Ops") is event-driven automation for auto-remediation, incident responses, troubleshooting, deployments, and more for DevOps and SREs. Includes rules engine, workflow, 160 integration packs with 6000+ actions (see https://exchange.stackstorm.org) and ChatOps. Installer at https://docs.stackstorm.com/install/index.html
https://stackstorm.com/
Apache License 2.0
6.07k stars 749 forks source link

A failed mistral task is not publishing using Yaql expression #3224

Closed parveenksofc closed 7 years ago

parveenksofc commented 7 years ago

A failed mistral task is not publishing using Yaql expression. What I am missing here?

"result": { "tasks": [ { "state_info": "{u'stdout': u'http://192.168:8000/getUrlStatus/1.1.1.1\\n', u'exit_code': 0, u'stderr': u'', u'result': u\"HTTPConnectionPool(host='192.168', port=8000): Max retries exceeded with url: /getUrlStatus/1.1.1.1 (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x1ae2210>, 'Connection to 192.168 timed out. (connect timeout=20)'))\"}", "name": "get_url_status", "created_at": "2017-02-15 15:47:02.304134", "updated_at": "2017-02-15 15:47:25.347170", "id": "09c51376-11a3-42aa-9e19-6832549cfdc1", "workflow_execution_id": "acfbc275-e3b7-456b-b885-483f6da2dffd", "state": "ERROR", "result": { "stdout": "http://192.168:8000/getUrlStatus/1.1.1.1\n", "exit_code": 0, "stderr": "", "result": "HTTPConnectionPool(host='192.168', port=8000): Max retries exceeded with url: /getUrlStatus/1.1.1.1 (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x1ae2210>, 'Connection to 192.168 timed out. (connect timeout=20)'))" }, "published": {}, "input": null, "workflow_name": "XXXX.fqdn_down_workflow.main" },

workflow

`main: type: direct input:

This is working when task get successful

"result": { "status": "OK", "firstip": "1.1.1.1", "tasks": [ { "state_info": null, "name": "get_url_status", "created_at": "2017-02-15 15:36:11.788088", "updated_at": "2017-02-15 15:36:14.971981", "id": "21cf06b3-6163-4c57-bd0a-2dc36a36c168", "workflow_execution_id": "42f10d55-fb21-4fa2-949f-2260e7e0a1c8", "state": "SUCCESS", "result": { "stdout": "http://192.168.56.101:8000/getLbStatus/1.1.1.1\n", "exit_code": 0, "stderr": "", "result": { "vip": "1.1.1.1", "LBstatus": "OK", "LBname": "Test_YYY" } }, "published": { "Terror": { "vip": "1.1.1.1", "LBstatus": "OK", "LBname": "Test_YYYY" }, "status": "OK", "firstip": "1.1.1.1", "lbname": "Test_Alteon" },

- Thanks

bigmstone commented 7 years ago

@parveenksofc Currently publish only happens when a task succeeds. This is a limitation in upstream mistral and something that has an existing request out for it. You can track its progress there and once it has made its way back into a mistral release it will get implemented here with StackStorm.