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

Allow force for inventory source synchronisation #15879

Open
4 of 9 tasks
simon-ess opened this issue Mar 10, 2025 · 0 comments
Open
4 of 9 tasks

Allow force for inventory source synchronisation #15879

simon-ess opened this issue Mar 10, 2025 · 0 comments

Comments

@simon-ess
Copy link

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.

Feature type

New Feature

Feature Summary

We are running into an issue where inventory source syncrhonisation misses an inventory update. Roughly speaking, the series of events are:

  • trigger job template that syncs inventory source
  • This starts inventory source syncrhonisation
  • While this is happening, trigger job template again with an updated inventory

Depending on the exact timing, this second update will not run an inventory source sync as one is already running. However, this means that the second job template run has an out-of-date inventory.

Looking at the source code, it seems that there is no obvious way to force an inventory sync on every run. I had hoped that one could do something like set update_cache_timeout to -1 or something like that, but it appears that it only accepts positive integers.

Select the relevant components

  • UI
  • API
  • Docs
  • Collection
  • CLI
  • Other

Steps to reproduce

This is a bit difficult to describe, as it depends a bit on timing things correctly. But roughly speaking:

  • Create a job template that uses an inventory that has a source that takes some amount of time to fetch
  • Trigger the job template with the inventory source in one state
  • Before the inventory sync is finished, trigger the job template again in such a way that the inventory is expected to be different

The second sync will not happen, meaning that the secon job template runs with an incorrect inventory.

Current results

The second run uses an out-of-date inventory.

Sugested feature result

Allow somone to specify that the inventory sync happens on every single run

Additional information

No response

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