Repository navigation
Description
If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via emailing
[email protected] where the issue will be triaged appropriately.
Title: 1.20 Logging shows first error message, not last error
Description:
I think the new logging for XDS errors is supposed to display the most recent error, but its displaying the first error repeatedly.
Example logs, showing both our control plane (xdsproxy) and envoy logs side by side (envoy config):
2021-10-07T18:43:43.794119Z debug xdsproxy upstream [23] terminated with status rpc error: code = Unavailable desc = closing transport due to: connection error: desc = "error reading from server: EOF", received prior goaway: code: NO_ERROR
2021-10-07T18:43:43.794146Z debug xdsproxy disconnected from XDS server: localhost:15012
2021-10-07T18:43:43.970932Z debug xdsproxy accepted XDS connection from Envoy, forwarding to upstream XDS server
2021-10-07T18:43:43.974097Z debug xdsproxy failed to create upstream grpc client: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp [::1]:15012: connect: connection refused"
2021-10-07T11:44:35.844981Z warning envoy config StreamAggregatedResources gRPC config stream closed since 52050ms ago: 14, closing transport due to: connection error: desc = "error reading from server: EOF", received prior goaway: code: NO_ERROR
You can see its stuck on goaway error, and ignores the connection refused one.
Looking at the code, it seems like we only update the error message if the status code changes. I think this is not the right behavior - the error message is important, not just the status code, and thus should be updated.
Side note: StreamAggregatedResources gRPC config stream closed since 165306ms ago: 14 would be much more readable like StreamAggregatedResources gRPC config stream closed since 2m32s ago: 14, or even just seconds instead of ms
Repro steps:
With istio: connect to control plane then tear down the control plane. Usually you will get goaway then connection refused.
Activity
howardjohn commentedon Oct 7, 2021
@tbarrella
tbarrella commentedon Oct 8, 2021
Thank you, I can open a PR for this