Skip to content

1.20 Logging shows *first* error message, not *last* error #18508

Closed

Description

@howardjohn

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

  1. added
    triage
    on Oct 7, 2021
  2. howardjohn commented on Oct 7, 2021

    @howardjohn
    ContributorAuthor
  3. added and removed
    triage
    on Oct 8, 2021
  4. tbarrella commented on Oct 8, 2021

    @tbarrella
    Contributor

    Thank you, I can open a PR for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions