-
Notifications
You must be signed in to change notification settings - Fork 24
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
Long Running ansibleRuns hang if they take longer than a minute to finish #175
Comments
Hi @eljohnson92 , do you reproduce the same issue when running the playbook outside the provider ? |
@fahedouch thanks for taking a look, I am not able to reproduce this outside of the provider, in the same container running this manually seems to work fine
|
@eljohnson92 the reconcile func set a context timeout to By the way the reconcile loop is not designed to run long-term process otherwise it can cannot coordinate stuff |
@fahedouch could we have ansible-runner run async of the reconcile loop? I know some other resources in crossplane use an async method to reconcile. |
@eljohnson92 I think we have to do Poc for this purpose because we usually need the |
@fahedouch it looks like upjet uses this callback functionality for async functionality on the
|
SGTM but I think it deserves a Poc |
Also see guidance for enabling the upjet Note that we will likely prefer to use provider-terraform over provider-ansible for declarative infrastructure management whenever possible. However, we are hoping to replace our use of Ansible AWX with Crossplane ansible-provider for executing legacy ansible content. Most of this content is long-running. For example, provisioning a vm and installing/configuring a product like Foreman on the vm. As you can imagine, such a playbook takes quite a long time to run. Provider terraform appears to have a hard 20 minute timeout. I would think provider-ansible should have a timeout at least that long. |
@fahedouch I've been looking into this a little bit, I think the best solution might actually be to use |
I tried an implementation of this locally, but even with the |
Making async func do not resolve our timeout issue as its impact the async
I don't see how to do this |
Yes we can try with 20 minutes timeout |
@fahedouch @ron1 I have opened up a PR to configure the timeout in provider-ansible to mirror provider-terraform if you all could give it a look/test, it seems to work well for my use case |
See related |
What happened?
While testing a role I noticed at a certain point it starts to hang, I have distilled it to a simple playbook to reproduce it, it looks like if an ansibleRun takes longer than around 60 seconds to finish the process hangs and never finishes.
How can we reproduce it?
I have slightly modified the example playbook yaml to reproduce this
in the debug logs I can see the following output showing the process does not finish
in the container, I can also see a pretty strange
ps
outputWhat environment did it happen in?
Crossplane version: 1.10.1
provider-ansible version: main
The text was updated successfully, but these errors were encountered: