-
Notifications
You must be signed in to change notification settings - Fork 106
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
pkg/resource: applicator breaks optimistic concurrency and overwrites values #483
Comments
Thanks for spotting this @sttts. At first glance I agreed with your assessment, but after digging a little deeper I think we're okay. Or more specifically, I don't think we're breaking optimistic concurrency anywhere that it matters much. As described in crossplane/crossplane#4047 we have two applicator implementations -
|
Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as |
What happened?
Looking at the claim controller, updating the XR (
cp
in the code), the following race with other actors in the system (controllers, user with kubectl) exists:cp
cp
whatever it wants to updatecp
cp.RV = current.RV
Assuming between 1 and 3a some client updates the XR out of band, e.g. some other controller, or kubectl. 3c will wipe out that change, won't it?
Above is just one example for that issue. The apply func is widely used in Crossplane.
How can we reproduce it?
This will likely show up as subtle bugs as this is some kind of time travel, or controllers fighting for their desired state of the world and racing with their informers.
What environment did it happen in?
Crossplane version: main
The text was updated successfully, but these errors were encountered: