-
Notifications
You must be signed in to change notification settings - Fork 823
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
Incorrect error logging caused by ResourceVersion conflict on SDK Patch call #3967
Labels
kind/bug
These are bugs.
Comments
I know why this is -- the conflict doesn't reigster under |
Got it! Fix coming shortly. |
markmandel
added a commit
to markmandel/agones
that referenced
this issue
Aug 28, 2024
Missed this little of nuance in code review when moving to Patch with the SDK Sidecar - in that a Patch operation doesn't return a Conflict error type/status value if it fails, so every time it does, the Agones sidecar will log it as an error on production installs. So this cleaned up a few things: * renamed "debugError" type to "traceError" type, since we only log it under Trace, not Debug. * if `patchGameServer` fails under the error `IsInvalid`, wrap it in a TraceError so it doesn't show up in prod. * Wrapped the error with `errors` context, such that if the patch does fail, it's far easier now to work out where it failed. Closes googleforgames#3967
markmandel
added a commit
to markmandel/agones
that referenced
this issue
Aug 28, 2024
Missed this little of nuance in code review when moving to Patch with the SDK Sidecar - in that a Patch operation doesn't return a Conflict error type/status value if it fails, so every time it does, the Agones sidecar will log it as an error on production installs. So this cleaned up a few things: * renamed "debugError" type to "traceError" type, since we only log it under Trace, not Debug. * if `patchGameServer` fails under the error `IsInvalid`, wrap it in a TraceError so it doesn't show up in prod. * Wrapped the error with `errors` context, such that if the patch does fail, it's far easier now to work out where it failed. Closes googleforgames#3967
markmandel
added a commit
to markmandel/agones
that referenced
this issue
Aug 28, 2024
Missed this little of nuance in code review when moving to Patch with the SDK Sidecar - in that a Patch operation doesn't return a Conflict error type/status value if it fails, so every time it does, the Agones sidecar will log it as an error on production installs. So this cleaned up a few things: * renamed "debugError" type to "traceError" type, since we only log it under Trace, not Debug. * if `patchGameServer` fails under the error `IsInvalid`, wrap it in a TraceError so it doesn't show up in prod. * Wrapped the error with `errors` context, such that if the patch does fail, it's far easier now to work out where it failed. Closes googleforgames#3967
markmandel
added a commit
to markmandel/agones
that referenced
this issue
Sep 12, 2024
Missed this little of nuance in code review when moving to Patch with the SDK Sidecar - in that a Patch operation doesn't return a Conflict error type/status value if it fails, so every time it does, the Agones sidecar will log it as an error on production installs. So this cleaned up a few things: * renamed "debugError" type to "traceError" type, since we only log it under Trace, not Debug. * if `patchGameServer` fails under the error `IsInvalid`, wrap it in a TraceError so it doesn't show up in prod. * Wrapped the error with `errors` context, such that if the patch does fail, it's far easier now to work out where it failed. Closes googleforgames#3967
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened:
After upgrading to 1.41, we started getting a couple of new error messages in the logs for the Agones sidecar:
and:
and:
It is due to the change in #3803 that adds a test Json Patch operation that checks the ResourceVersion and rejects patch updates if there is a conflict. If two calls are made to update a field in the gameserver spec (like setting a label/annotation or changing the state) in quick succession then a conflict can happen.
After the failed patch update, it gets retried and then succeeds - so I don't think this is actually an error and is just how Kubernetes works.
What you expected to happen:
For this error message to not be an error or to be debug logging.
How to reproduce it (as minimally and precisely as possible):
The error message is from Kubernetes and can be recreated with kubectl by setting an older/smaller value for the
/metdata/resourceVersion
field for a running gameserver:To recreate with Agones, then two clients setting a label or annotation on the same gameserver at the same time will generate the error.
Anything else we need to know?:
Environment:
kubectl version
): v1.29.6-gke.1038001The text was updated successfully, but these errors were encountered: