st2: Mistral workflow stuck in RUNNING state after error encountered.
A task was marked as RUNNING despite extra information being available indicating an error occurred.
"elapsed_seconds": 231993.945685,
"web_url": "https://automate.dm.gg/#/history/58b06299fd6f06179d18eb94/general",
"parent": "58b05f28fd6f0640445ed4d5",
"result": {
"tasks": [
{
"state_info": null,
"name": "check_host_health",
"created_at": "2017-02-24 16:43:05.537055",
"updated_at": null,
"id": "0986cc88-4696-4890-8b74-0cc9c0b552b9",
"workflow_execution_id": "1417305b-288d-40f7-b7fc-324ba897fd3a",
"state": "RUNNING",
"result": [],
"published": {},
"input": null,
"workflow_name": "st2dm_upgrade_pkg.post_upgrade_pkg.check_environment"
}
],
"extra": {
"state_info": "list index out of range",
"state": "ERROR"
}
The task that was called is shown below and the error is referring to mistral being unable to publish the variable because YAQL detected the list index out of range.:
check_host_health:
action: livestatus.get
input:
table: services
columns: [ host_address ]
stats:
- state != 0
- state_type = 1
- "&2"
filters:
- host_address ~ ^<% $.host %>
- display_name ~ OS::Hardware
- "!"
- display_name ~ SSH::OOB service status
- "!"
- display_name ~ HTTP::Zend OPCache
- "!"
publish:
health_status: <% int(task(check_host_health).result.result[0][1]) %>
on-success:
- remove_schedule_downtime: <% $.health_status = 0 %>
- abort_upgrade: <% $.health_status != 0 %>
on-error: abort_upgrade
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (14 by maintainers)
@emptywee are the errors you posted related to
list index out of rangeor are they all errors related to tasks remaining inRUNNINGstate?@lakshmi-kannan the use case posted in gist isn’t quite the same as the one I posted. Here is a simple workflow to reproduce the error
actions/yaql_out_of_range.yaml
actions/workflow/yaql_out_of_range.yaml