-
Notifications
You must be signed in to change notification settings - Fork 437
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
Invalid resourceVersion error in upstream discovery #8635
Comments
@jenshu Any update on this issue? Without a reproducer this is not actionable. Did "the customer" ever come back to you? If not, I'm gonna close this ticket (and can create a new one, or re-open if this issue surfaces again). |
@DuncanDoyle - responded offline with context |
Closing, as there is no reproducer. Can re-open if this surfaces again. |
Steps to reproduce:
|
See #9968 (comment) for inspiration as the underlying problems are the same (different code paths however) |
This doesn't seem related to persistProxySpec. It's happening with upstreams, and with persistProxySpec=false. Here are some steps to reproduce from a clean cluster:
At this point, the upstream got created correctly but it seems like something then tried to update the upstream, resulting in a bunch of these errors (note, these errors may not happen every time on create.. but they do consistently happen later when we try to update the service, below):
More resourceVersion errors are seen in the logs, and the upstream does not pick up the changes (still shows old labels in Note, making any change to the Service |
@DuncanDoyle what versions does this make sense to target this for? |
I believe I've gotten to the root cause of this In a nutshell:
The key question from here is: Should Upstreams created by discovery contain the watchLabels? or perhaps all labels from the Service?
|
Having toyed with both options, they both seem viable in the sense that they allow resyncs to occur successfully Removing labels from the UpstreamSelector seems to be the better option for a couple of reasons:
This behavior has been present since this repo was first split out from solo-projects so there is little context around why this decision was made, and I'm not clear if the selector was actually ever populated in the Created upstreams do get the Therefore I'm comfortable treating this behavior as a bug and "fixing" it accordingly |
A fix for this has merged to OSS @DuncanDoyle, please advise if there is any particular version that will require OSS and/or EE release ASAP or if it's sufficient to have this bugfix to roll out whenever the next release(s) otherwise occur |
A fix for this has now been released in all LTS versions for OSS and EE as well as OSS beta |
Gloo Edge Product
Enterprise
Gloo Edge Version
v1.14.x
Kubernetes Version
1.27
Describe the bug
A customer reported that gloo discovery is not creating all the upstreams that they expect. Deleting and recreating the services doesn't seem to help.
When checking the
discovery
pod logs, they saw errors like:{"level":"error","ts":"2023-08-30T12:43:51.281Z","logger":"uds.v1.event_loop.uds","caller":"syncer/setup_syncer.go:117","msg":"error: event_loop.uds: error in uds plugin : reconciling resource default-xxx-80: updating kube resource default-xxx-80: (want 2398796740): upstreams.gloo.solo.io \"default-xxx-80\" is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update","version":"undefined","stacktrace":"github.com/solo-io/gloo/projects/discovery/pkg/uds/syncer.RunUDS.func2\n\t/go/pkg/mod/github.com/solo-io/gloo@v1.14.12/projects/discovery/pkg/uds/syncer/setup_syncer.go:117"}
Deleting the erroring upstreams didn't seem to resolve the issue (upstreams would get recreated again, with same error in logs)
Note: I have also seen a similar error (
metadata.resourceVersion: Invalid value: 0x0: must be specified for an update
) on a clean install, but in my case it didn't seem to affect upstream creation.Recommended steps:
Expected Behavior
resourceVersion error should not occur and/or should resolve itself with retries, and expected upstreams should be created
Steps to reproduce the bug
See above
Additional Environment Detail
No response
Additional Context
No response
┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: