-
Notifications
You must be signed in to change notification settings - Fork 542
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
Duplicate owner reference in packageserver service #1237
Comments
Hey @bryanl, thanks for filing this bug. We think it stems from the way we set owner references without checking the existence of previous references. Will take a look at this one. |
Looking into this a bit, I see we do check for existing owner references when assigning a new owner to an object, and return early instead of assigning the same reference again. https://github.com/operator-framework/operator-lifecycle-manager/blob/master/pkg/lib/ownerutil/util.go#L158 That being said this bug shows that the duplicate owernerref is being set again. This suggests it could be a race condition. The call that sets the ownerref for the packageserver service is here
One thing I noticed is that the function that actually sets the ownerref has the following signature.
It takes copies to objects instead of pointers to the objects themselves. Therefore in the case where one sync runs, and calls this function, it sees no references and appends them, and if another sync is running and calls this function with the same object, it will not see the updated references yet and set it again. Then as the sync updates the object on the api server it sets duplicate references. I played around with refactoring the signature to take in pointers to the object and owner args instead, but this causes issues like All that being said if this was on on minikube then the sync should run really fast, and assuming no errors were present I'm a little doubtful its a race. Any thoughts @ecordell @njhale? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing as this appears to have already been resolved but automation didn't close this out immediately. Try using a more up-to-date OLM release that contains the fixes linked in this issue. Feel free to re-open if those fixes don't address completely address your issue. |
Bug Report
What did you do?
Installed OLM using kubectl
What did you expect to see?
The service created should have a single owner reference to the CSV.
What did you see instead? Under which circumstances?
The service has multiple owner references to the same CSV.
Environment
https://github.com/operator-framework/operator-lifecycle-manager/tree/976f2b981c326ee51748045f6df20317d6d95bd5
Minikube
The text was updated successfully, but these errors were encountered: