-
Notifications
You must be signed in to change notification settings - Fork 905
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
cannot get composite resource #5151
cannot get composite resource #5151
Comments
Indeed it looks like for some reason the cache was not updated yet and therefore Crossplane is not able to find the XR 🤔 However, AFAICT, Crossplane should try again after 60 seconds, see here, you can set a different poll interval through the |
@duizabojul Could you please let us know if you can reproduce this without realtime compositions enabled? |
First try deleting an XR with realtime compositions enabled resulted in parent resource never got composed after all tree was successfully deleted. Here are the logs | grep resource-name, you can see a lot of enqueuing and deletions happening the same second, and the @negz With realtime compositions disabled, i can't reproduce (made 10 tries, everything always went smooth) |
CC @sttts |
Is this the latest 1.14.x release? #5034 was causing a deadlock on updates to the XRD sometimes. Nvmd. You write 1.14.4 at the bottom. |
Wondering, could you attach full debug logs around the time this happens? |
Sorry for delay, here are full logs: Process stopped at this resource:
You can see the corresponding log generated the same second as resource creation:
|
@duizabojul crossplane/crossplane-runtime#641 is a potential race when starting the XR controller. Wondering, are you able to test a development version of Crossplane by compiling yourself? Would be great to get feedback. @negz please take a careful look on the synchronization logic there. Am I right that we never waited for the informers in the engine? |
Of course, do you want I compile crossplane on your branch? |
Yes, vendor in my branch via go.mod of Crossplane. |
I got the same behavior, random resource is stuck forever. Here are logs: Stuck resource is:
|
How can I reproduce this? Could you prepare a minimal example that I can run here locally? |
I'm sorry I am really busy at work right now, I can't take much time to try to reproduce this with a simple setup. I think this should happens with any composition if you delete recreate it enough time to trigger the bug (it happens really easily in our eks setup, once every 2 or 3 delete/recreate). If not, maybe adding functions in the mix is required to reproduce. Also, it happens rarely on "parent" XR, so it should be easier to trigger bug with a composition creating child XRs. |
ok, will see whether I can easily reproduce it. Current my assumption is that this even happens without realtime compositions, it's just less surprising. |
You are right @duizabojul, it was automatically closed because the description of crossplane/crossplane-runtime#641 mentioned fixing this. |
Trying to look at this now (these logs) XRD created on line 92 (36 seconds before not found):
Reconcile starts on line 335:
I noticed that there is this on line 349 (this in fact happens multiple times afterwards too, e.g. 360-361 and 370-371)
and during the same second there is this on line 426:
All in all, there are 26 registered deletions that can be found by searching for I'm new to this codebase, so I don't know why the Hope this helps a little to get going. |
I think that it is either of these two that garbage collect/delete the XR:
Are there some links missing between the template and XR? |
Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as |
/fresh |
I'm hopeful #5651 might have fixed this. It would be helpful if someone could try out that PR and see if it's possible to reproduce this issue. |
Is there a docker tag already built I can try? |
Looks like the current HEAD of Instructions for installing latest from |
I tried this image and I got a similar behaviour from crossplane (always with realtime compositions + functions): when a XR is deleted and recreated (quickly in my case because i use argocd) it happens that the controller does not "see" the newly created XR and nothing can make crossplane compose it again (even modifying resource to trigger an update event). The only way to get it back on track is to relaunch crossplane pod or recreate XR until crossplane see it again. Here are logs of crossplane controller: logs.txt If you search the # The live manifest hanging in cluster
apiVersion: iam.crossplane.airnity.io/v1alpha1
kind: XGKEWorkloadIdentity
metadata:
annotations:
... # no crossplane annotations
creationTimestamp: '2024-06-01T20:17:45Z'
generation: 1
name: argocd-app-controller
resourceVersion: '3170018'
uid: db7d53bf-ce97-40c0-bbb2-6dbf2ed00402
spec:
compositionUpdatePolicy: Automatic
params: ...
# no crossplane status |
Interesting. I'll try reproduce this when I get a chance. |
What happened?
Please note I use realtime compositions feature of crossplane 1.14
Some of my compositions are creating other composite resources, triggering near instant reconciliation of multiple nested level of composite/composed resources.
In a fair amount of tries, composition creation get stuck because of the following error:
This error happens the exact moment composite is created by crossplane and should be reconciled.
There is maybe a race condition here and crossplane does not retry reconciliation so my composition is stuck until i delete the composite resource:
return reconcile.Result{}, errors.Wrap(resource.IgnoreNotFound(err), errGet)
How can we reproduce it?
I can make it happens regulary (once every 3/4 apply of my composition) with the setup i described: a composite resource creating other composite resources, realtime compositions feature enabled, and maybe functions are involved in the bug (server side apply?)
Enregistrement.de.l.ecran.2023-12-19.a.17.48.45.mov
Here you can see on argocd, i delete my composition, and creation get stuck after the creation of XPolicy because of this bug. Crossplane never retries and I have to trigger a reconciliation manually, by deleting the XPolicy for example.
What environment did it happen in?
Crossplane version: 1.14.4
The text was updated successfully, but these errors were encountered: