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

Bug 1836212: Introduce a custom Dailer to close TCP connections when heartbeat fails #200

Merged
merged 1 commit into from May 28, 2020

Conversation

pliurh
Copy link
Contributor

@pliurh pliurh commented Apr 28, 2020

Force close connections on heartbeat failure, when heartbeat failed, we invoke closeAllConns and reestablish new connections. We use the writer's periodic Get() call as hearbeat singal, to detect whether the HTTP connection to the apiserver is still healthy.

@pliurh
Copy link
Contributor Author

pliurh commented Apr 28, 2020

This PR is inspired by kubernetes/kubernetes#78016, and it can mitigate the problem caused by https://bugzilla.redhat.com/show_bug.cgi?id=1826769

glog.Warningf("Failed to fetch node %s (%v); retrying...", nodeName, lastErr)
glog.Warningf("getNodeState(): Failed to fetch node state %s (%v); close all connections and retry...", w.node, lastErr)
// Use the Get() also as an client-go keepalive indicator for the TCP connection.
if w.OnHeartbeatFailure != nil {
Copy link
Member

Choose a reason for hiding this comment

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

I think this can't be null, but if so, wouldn't it better for this to explode instead of not working? Or, if you are on the defensive side, can you add a log here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think you're right.

@fedepaol
Copy link
Member

Nice!
So, if I got this right, the general idea here is that informers watch connection may be established but not working and we leverage the periodic Get to force them to disconnect (and automatically reconnect, I assume)

@pliurh
Copy link
Contributor Author

pliurh commented May 11, 2020

Nice!
So, if I got this right, the general idea here is that informers watch connection may be established but not working and we leverage the periodic Get to force them to disconnect (and automatically reconnect, I assume)

Correct. This happens in my environment frequently. But I'm still waiting for QE's feedback with their environment. Normally, if the cluster network works as expected, the timeout won't happen. Have you experienced such an issue?

@fedepaol
Copy link
Member

Nice!
So, if I got this right, the general idea here is that informers watch connection may be established but not working and we leverage the periodic Get to force them to disconnect (and automatically reconnect, I assume)

Correct. This happens in my environment frequently. But I'm still waiting for QE's feedback with their environment. Normally, if the cluster network works as expected, the timeout won't happen. Have you experienced such an issue?

Nope, but I'll keep an eye on that

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 12, 2020
@fedepaol
Copy link
Member

Nice!
So, if I got this right, the general idea here is that informers watch connection may be established but not working and we leverage the periodic Get to force them to disconnect (and automatically reconnect, I assume)

Correct. This happens in my environment frequently. But I'm still waiting for QE's feedback with their environment. Normally, if the cluster network works as expected, the timeout won't happen. Have you experienced such an issue?

Nope, but I'll keep an eye on that

Update: we are definitely experiencing that.

@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 18, 2020
@pliurh pliurh changed the title Introduce a custom Dailer to close TCP connections when heartbeat fails Bug 1836212: Introduce a custom Dailer to close TCP connections when heartbeat fails May 19, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. label May 19, 2020
@openshift-ci-robot
Copy link
Contributor

@pliurh: This pull request references Bugzilla bug 1836212, which is invalid:

  • expected the bug to target the "4.5.0" release, but it targets "4.6.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1836212: Introduce a custom Dailer to close TCP connections when heartbeat fails

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label May 19, 2020
@pliurh
Copy link
Contributor Author

pliurh commented May 19, 2020

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label May 19, 2020
@openshift-ci-robot
Copy link
Contributor

@pliurh: This pull request references Bugzilla bug 1836212, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label May 19, 2020
@pliurh
Copy link
Contributor Author

pliurh commented May 25, 2020

/retest

@pliurh
Copy link
Contributor Author

pliurh commented May 25, 2020

/test e2e-aws

1 similar comment
@pliurh
Copy link
Contributor Author

pliurh commented May 26, 2020

/test e2e-aws

@zshi-redhat
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels May 27, 2020
Force close connections on heartbeat failure, when heartbeat failed, we invoke closeAllConns and reestablish new connections. We use the writer's periodic Get() call as hearbeat singal, to detect whether the HTTP connection to the apiserver is still healthy.
@zshi-redhat
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 28, 2020
@openshift-merge-robot openshift-merge-robot merged commit 6c6b60f into openshift:master May 28, 2020
@openshift-ci-robot
Copy link
Contributor

@pliurh: All pull requests linked via external trackers have merged: openshift/sriov-network-operator#200. Bugzilla bug 1836212 has been moved to the MODIFIED state.

In response to this:

Bug 1836212: Introduce a custom Dailer to close TCP connections when heartbeat fails

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

SchSeba pushed a commit to SchSeba/sriov-network-operator that referenced this pull request Dec 27, 2021
Fix Makefile uninstall target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants