xds: fix NACK logging after slog migration#41171
Merged
aanm merged 2 commits intocilium:mainfrom Aug 15, 2025
Merged
Conversation
Member
mhofstetter
commented
Aug 15, 2025
This commit fixes a log message that still contains substitutions in the log message after the log migration. ``` 2025-08-14T18:19:16.429606429Z time=2025-08-14T18:19:16.427860732Z level=warn source=/go/src/github.com/cilium/cilium/pkg/envoy/xds/server.go:397 msg="NACK received for versions after %s and up to %s; waiting for a version update before sending again" module=enterprise-agent.agent.controlplane.envoy-proxy [...] version=19 responseNonce=20 ``` Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
Currently the log message that reports an xDS NACK from envoy contains duplicates for the version & nonce. ``` 2025-08-14T18:19:16.429606429Z time=2025-08-14T18:19:16.427860732Z level=warn source=/go/src/github.com/cilium/cilium/pkg/envoy/xds/server.go:397 msg="NACK received for versions after %s and up to %s; waiting for a version update before sending again" module=enterprise-agent.agent.controlplane.envoy-proxy [...] xdsAckedVersion=19 xdsNonce=20 version=19 responseNonce=20 ``` Therefore, this commit removes the extra log fields `responseNonce` & `version` when logging the message because they are already part of the scoped `requestLog`. In addition the variable `xdsAckedVersion` gets renamed to `version` because having the word `acked` in the field for the NACK log message would be confusing. Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
Member
Author
|
/test |
aanm
approved these changes
Aug 15, 2025
sayboras
approved these changes
Aug 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.