set_stats failing intermittently

I use multiple workflows successfully and run them on schedules. They work 90%+ of the time, but not 100%. The failure happens in the first job of the workflow when it does not set the data needed for the second job to run. I will give a single example:

Here is the task:

  • name: Pass data forward to Work Flow
    set_stats:
    data:
    infra_ips_list: “{{ node_ips_json }}”

Here is the log output:

TASK [Pass data forward to Work Flow] ******************************************12:21:36

1619
task path: /runner/project/Ansible/playbooks/CronTasks/get-infranode-ips.yml:24

ok: [10.xx.xx.xx] => {

1621
“ansible_stats”: {

1622
“aggregate”: true,

1623
“data”: {

1624
“infra_ips_list”: [

1625
“10.xx.xx.1”,

1626
“10.xx.xx.2”,

1627
“10.xx.xx.3”

1628
]

1629
},

1630
“per_host”: false

1631
},

1632
“changed”: false

1633
}

Here are the artifacts:
{}

The data are absolutely there, according to the log, and the task is green for success, but the stats artifacts are not set. Again, this works as expected 90%+ of the time.

What more can I do to debug this?

Thank you,

Kevin

Does everyone else have 100% success with set_stats? Is this a known issue? Does no one else use set_stats?

Thank you,

Kevin

I have had the interface not update the screen properly on occasion. Does refreshing the browser or starting a new browser session fix this?

The set_stats is something I use in every one of my workflows and never had it fail.

Mike

Thank you. No, the data elements from the first workflow task are well and truly unavailable to the next task. It’s not a UI glitch. The data are logged accurately and the set_stats task is successful, but the next workflow step never receives a thing.

Hi!

Can you please let us know the version of AWX you are using?

Seth

I have a suspicion that this is hitting https://github.com/ansible/awx/issues/11821, which was fixed at some point, although I didn’t know exactly how. In the devel branch artifacts are probably getting saved robustly.

AWX 20.0.1

The 11821 bug surely does sound on target. The problem is I’m seeing about a 95% success rate. The bug report says the bug was not reproduced and in a single run the failure did not occur. I do see it was reprod and verified in the linked thread downstream, so maybe I should have confidence. Is 20.0.1 outside that patch stream?

Thank you!

Kevin

So, is v20.0.1 impacted? Is there a version we know works?

The reference PR has been released in 21.1.0, so we’d recommend upgrading to that. Let us know if that works!

AWX Team

Good to hear. Thank you! I don’t know what our release cadence is, but I’ll swing back when it happens.