Skip to content
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

Suppress reconnection logs #260

Merged
merged 1 commit into from
Nov 5, 2021

Conversation

trozet
Copy link
Contributor

@trozet trozet commented Nov 4, 2021

When reconnecting, if using a zero backoff and failing to reconnect to
ovsdb for a period of 10 seconds, the logs are flooded with failed
attempts. After 5 failed attempts, just notify the user further failures
are suppressed.

An example here:
https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/origin-ci-test/pr-logs/pull/openshift_ovn-kubernetes/812/pull-ci-openshift-ovn-kubernetes-master-e2e-aws-ovn-upgrade/1456291255993503744/artifacts/e2e-aws-ovn-upgrade/gather-extra/artifacts/pods/openshift-ovn-kubernetes_ovnkube-master-fqnpj_ovnkube-master.log

Timestamps where reconnect starts and ends:
I1104 17:45:54.792590 1 client.go:264] "msg"="trying to connect" "database"="OVN_Northbound" "endpoint"="ssl:10.0.190.62:9641"
I1104 17:46:04.230090 1 client.go:219] "msg"="successfully connected" "database"="OVN_Northbound" "endpoint"="ssl:10.0.190.62:9641"
I1104 17:46:04.230107 1 client.go:240] "msg"="reconnected - restarting monitors" "database"="OVN_Northbound"

In between there tons of:
E1104 17:50:57.742817 1 client.go:1015] "msg"="failed to reconnect" "error"="unable to connect to any endpoints: failed to connect to ssl:10.0.168.127:9642: failed to open connection: dial tcp 10.0.168.127:9642: connect: connection refused. failed to connect to ssl:10.0.190.62:9642: endpoint is not leader. failed to connect to ssl:10.0.245.88:9642: endpoint is not leader" "database"="OVN_Southbound"

every few milliseconds

@trozet
Copy link
Contributor Author

trozet commented Nov 4, 2021

@dave-tucker

When reconnecting, if using a zero backoff and failing to reconnect to
ovsdb for a period of 10 seconds, the logs are flooded with failed
attempts. After 5 failed attempts, just notify the user further failures
are suppressed.

Signed-off-by: Tim Rozet <trozet@redhat.com>
@coveralls
Copy link

coveralls commented Nov 4, 2021

Pull Request Test Coverage Report for Build 1423024974

  • 8 of 9 (88.89%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 72.878%

Changes Missing Coverage Covered Lines Changed/Added Lines %
client/client.go 8 9 88.89%
Totals Coverage Status
Change from base Build 1399758238: 0.03%
Covered Lines: 4165
Relevant Lines: 5715

💛 - Coveralls

Copy link
Collaborator

@dave-tucker dave-tucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dave-tucker dave-tucker merged commit f493ff7 into ovn-org:main Nov 5, 2021
@dave-tucker dave-tucker added the fix label Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants