-
Notifications
You must be signed in to change notification settings - Fork 350
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
Integration stuck waiting for platform #660
Comments
Hi Nicola, I'm exactly facing the same issue. I'm trying a small demo, followed your official documentation as well as your demo video, but its getting hanged at "Waiting for Platform" every time. How to make sure the platform is ready and how to make the integration successful? Can you please help me out here? I'm running kamel on Openshift installed on AWS instance. Thanks a lot. |
Hi @ShravanGeek, @jamesnetherton is working on this, but looking at issue #677, it does not solve your problem, because your platform seems really stuck because it is not able to build context images. You can get the status (phase) of the platform using: In order for the platform to be |
Let's discuss this in #677 |
@ShravanGeek stop spamming in differenti issues |
There's maybe a few ways of dealing with this. Just wondering what the best option is... The lazy way could be to requeue the integration reconcile requests where the phase is 'waiting for platform'. Then when the phase is updated, just return from the reconcile function as per normal. After a quick test it seems to work ok. |
Yeah, that should work. Another possible optimization is to remove all the places where we do "edits" to objects in order to trigger a reconcile loop (e.g. when a context is ready there should be a piece of code that does a small edit on the label of a integration) and replace it with a cleaner approach like:
This way we can also get rid later of continuous polling we currently do (inherited from old operator-sdk model). There should be some utilities in controller runtime to deal with such kind of dependencies. |
I think we should do something like this: https://github.com/apache/camel-k/blob/master/pkg/controller/integration/integration_controller.go#L74-L88 |
Yeah, that's the "utility" I was referring to |
Another option is to explicitly search for the integrations and update their states, as we do when integrations are pending completion of their integration contexts: The pattern used for watching changes to secondary resource builds and requeue the owner integration contexts relies on the ownership relationship. It was the idea behind #595, that has yet to be revived if needed. That being said, it may be possible to adapt it with a handler that would enqueue integrations in the waiting state. |
@astefanutti can we leverage EnqueueRequestsFromMapFunc ? |
@lburgazzoli yes exactly. As stated in the documentation, this seems a good fit for our use case:
If it turns out to be the case, we may consider applying it to update integrations that are pending completion of their integration contexts when their builds complete. |
Hopefully that's along the right lines of what's required? |
@jamesnetherton looks exactly like what's needed! |
maybe we can open an issue to evaluate if the same logic can replace https://github.com/apache/camel-k/blob/master/pkg/controller/integrationcontext/build.go#L223-L241 |
Sometimes when I create an integration before the platform is ready, the integration goes in state "Waiting for Platform" but it never leaves that state.
We should make sure that changes to platform and contexts retrigger change in integration.
The text was updated successfully, but these errors were encountered: