Hi,
I have a simple workflow collecting an array and afterwards starting core.http for every item in the
array.
Therefore I use the with-items solution:
Do_Loop:
with: <% ctx().list_of_items %>
action: core.http
input:
url: "https://some.service.net/api/add/<% item().value %>"
method: "PUT"
headers: {"X-APP":"<% st2kv('system.appid') %>","X-APIKEY":"<% st2kv('system.apikey', decrypt=>true) %>","content-type":"application/json","Accept":"application/json"}
body: '{
"host": "<% item().value %>",
"description": "Detail: <% item().event_id %>"
}'
In my current example, the list contains 286 values which leads to 286 http action executions.
First I had the issue that the actions took longer and longer till everything stuck. After searching
issues, etc. I found a PR where it is stated to use a coordination backend. (Acquire lock in workflow engine before handling action execution
completion by m4dcoder · Pull Request #4595 · StackStorm/st2 · GitHub)
Therefore I installed and configure redis. Since then the actions run smooth and in short time, but the overall workflow is still in progress even if all 286 actions are executed.
By checking the wfl logs I get the following:
tail -F /var/log/st2/st2workflowengine.log
2021-02-25 18:04:23,417 140710782507280 DEBUG keyvalue [-] get_key key_id: appid, scope: st2kv.system,
user: st2admin, decrypt: False
2021-02-25 18:04:23,706 140710782507280 DEBUG keyvalue [-] get_key key_id: apikey, scope: st2kv.system,
user: st2admin, decrypt: True
2021-02-25 18:04:23,986 140710782507280 DEBUG keyvalue [-] get_key key_id: appid, scope: st2kv.system,
user: st2admin, decrypt: False
2021-02-25 18:04:24,068 140710782507280 DEBUG keyvalue [-] get_key key_id: apikey, scope: st2kv.system,
user: st2admin, decrypt: True
2021-02-25 18:04:24,553 140710782507280 DEBUG keyvalue [-] get_key key_id: appid, scope: st2kv.system,
user: st2admin, decrypt: False
2021-02-25 18:04:24,638 140710782507280 DEBUG keyvalue [-] get_key key_id: apikey, scope: st2kv.system,
user: st2admin, decrypt: True
2021-02-25 18:04:24,921 140710782507280 DEBUG keyvalue [-] get_key key_id: appid, scope: st2kv.system,
user: st2admin, decrypt: False
It looks like it is still collecting the values from the keystore, but they are no longer needed. Every
http action is already satisfied.
It is visible that all actions of the workflow already succeeded by looking on the WebUI and the CLI.
Has someone any idea what is going on here?
Looks like the workflow is running forever.