# set\_stats failing intermittently

**URL:** <https://forum.ansible.com/t/set-stats-failing-intermittently/36661>\
**Category:** AWX Project\
**Created:** [May 25, 2022, 6:48pm UTC](https://forum.ansible.com/t/set-stats-failing-intermittently/36661 "2022-05-25T18:48:08Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [May 25, 2022, 6:48pm UTC](https://forum.ansible.com/t/set-stats-failing-intermittently/36661/1 "2022-05-25T18:48:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [May 31, 2022, 8:50pm UTC](https://forum.ansible.com/t/set-stats-failing-intermittently/36661/2 "2022-05-31T20:50:12Z")

</div>

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

Thank you,

Kevin

---

<div class="post-metadata">

**Author:** ![Mike\_Charchuk](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mike\_Charchuk](https://forum.ansible.com/u/Mike_Charchuk)\
**Post date:** [May 31, 2022, 10:00pm UTC](https://forum.ansible.com/t/set-stats-failing-intermittently/36661/3 "2022-05-31T22:00:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [May 31, 2022, 10:56pm UTC](https://forum.ansible.com/t/set-stats-failing-intermittently/36661/4 "2022-05-31T22:56:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [June 1, 2022, 7:28pm UTC](https://forum.ansible.com/t/set-stats-failing-intermittently/36661/5 "2022-06-01T19:28:17Z")

</div>

Hi!

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

Seth

---

<div class="post-metadata">

**Author:** ![AlanCoding](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/alancoding/32/301_2.png) [@AlanCoding](https://forum.ansible.com/u/AlanCoding)\
**Post date:** [June 1, 2022, 7:33pm UTC](https://forum.ansible.com/t/set-stats-failing-intermittently/36661/6 "2022-06-01T19:33:01Z")

</div>

I have a suspicion that this is hitting [https://github.com/ansible/awx/issues/11821](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.

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [June 1, 2022, 7:47pm UTC](https://forum.ansible.com/t/set-stats-failing-intermittently/36661/7 "2022-06-01T19:47:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [June 7, 2022, 12:54pm UTC](https://forum.ansible.com/t/set-stats-failing-intermittently/36661/8 "2022-06-07T12:54:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [June 8, 2022, 7:30pm UTC](https://forum.ansible.com/t/set-stats-failing-intermittently/36661/9 "2022-06-08T19:30:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kevin\_Knox](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kevin_knox/32/3926_2.png) [@Kevin\_Knox](https://forum.ansible.com/u/Kevin_Knox)\
**Post date:** [June 8, 2022, 7:50pm UTC](https://forum.ansible.com/t/set-stats-failing-intermittently/36661/10 "2022-06-08T19:50:52Z")

</div>

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