Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project updates and inventory updates don't always happen when required #15006

Open
5 of 11 tasks
willthames opened this issue Mar 18, 2024 · 0 comments
Open
5 of 11 tasks

Comments

@willthames
Copy link
Contributor

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to security@ansible.com instead.)

Bug Summary

If using branch-based jobs, with branch-based inventory, the should_update_again check can be incorrect.

If two jobs using different branches are triggered in relatively quick succession, and the later job checks to see if it needs to do its inventory update while the first job's inventory update is running, then should_update_again will return False, even though the inventory source may well have changed.

The easiest workaround is to just patch should_update_again to return True, but the proper fix is probably to check whether the task revisions are identical.

Note that this is related, but independent of #14101

AWX version

24.0.0

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

kubernetes

Modifications

yes

Ansible version

No response

Operating system

No response

Web browser

No response

Steps to reproduce

It's definitely tricky to reproduce as it's a race condition, preferably with a really long inventory update job (ours is about a minute) so that the second job doesn't run an inventory update

Run a task with one revision that one inventory
Run a second task shortly afterwards with a revision that leads to an observably different inventory

If this bug is hit, then the second task will not have its inventory update performed (this can be validated in the logs)

Expected results

We expect to see an inventory update run when the revision of the task is different in both tasks (otherwise the second task runs with the inventory of the first task which may be using an older or newer inventory)

Actual results

The second task ran with the inventory of the first task, no second inventory update happened

Additional information

We use helm to deploy awx rather than the operator, but the key problem with this is the should_update_again function, which is unchanged by our deployment methodology

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant