AWX 21.13.0 / 22.0.0 - No facts from jobs on Exec Nodes

Greetings,

We have setup AWX 22.0.0 (and 21.13.0 before) in k8s using operator and all seems well within the k8s cluster. We then created additional instances that are outside of the k8s cluster using execution nodes (deployed via install bundle from AWX itself). A playbook was created to test the functionality of storing facts in the AWX fact cache that reads as thus:

---
- name: Test Facts Cache
hosts: all
gather_facts: true
tasks:
- name: All your base...
ansible.builtin.debug:
msg: "Are belong to us!"

The project is sync’d from github and is part of the organization that has the exec node in its instance group. From there, the job template is setup to enable fact storage. When executing the job template no facts are cached in the host in AWX.

If we then use the exact same code in a project connected to the Default organization run against the exact same host, the facts are cached correctly. So, this brings me to ask if anyone can confirm that this is expected behavior or perhaps point out something that we’ve done incorrectly or plain not done that would allow for caching facts from job templates run on execution nodes?

Are all of the execution nodes running with the same timezone set (i.e. UTC)? There is a known issue where gathering facts from machines with different time zones can cause issues with fact gathering.

-The AWX Team

Hot dang! Nicely handled. Thanks for the information and confirmed that is what our issue was. If you’re ever in Bemidji, MN, let me know and I’ll happily spring for beverage of your choice. :slight_smile:

Interestingly, that seems to work perfectly when dealing with a static inventory, however, when we use a vmware inventory source, the facts don’t seem to translate. Am I doing something silly again?

Here’s the inventory source config:


{
"with_tags": true,
"validate_certs": false,
"cache": true,
"hostnames": [
"config.name | lower"
],
"properties": [
"config.name",
"guest.ipStack",
"summary.runtime.powerState",
"config.hardware.memoryMB",
"config.hardware.numCPU",
"config.guestFullName",
"config.uuid",
"guest.guestFullName",
"guest.guestFamily"
] }

Update: The inventory source of VMware was a red herring. The problem I was running into was that I was using job slicing and when that was the case, facts were not sent back to AWX, but when I turned the slicing off, boom goes the dynamite.

Is there also a known bug for not getting facts back when using Job Slicing?

Hi!

We did a lot of work around inventory recently for 22.0.0, and a bug may have been introduced. I think this is worth opening a github issue for this https://github.com/ansible/awx/issues

please provide details about reproducing the bug (# of slicing, and number of hosts in your inventory) on the ticket

Thanks!

AWX Team

WOOT!! #FIRST_AWX_BUG_I_HAVE_EVER_REPORTED