Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to reinitialize client? #342

Open
r7vme opened this issue Dec 8, 2017 · 3 comments
Open

How to reinitialize client? #342

r7vme opened this issue Dec 8, 2017 · 3 comments
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.

Comments

@r7vme
Copy link

r7vme commented Dec 8, 2017

Hello, this is more support question that a bug (i hope so).

I'm using client-go in small app that calls cluster API and checks nodes in NotReady state (like cloud-provider code does). I've stuck with a problem that after pod (guest cluster kubernetes master vm) hard killed, i have dead tcp connection in my pod. Client-go tries to reuse it for next 10-17 minutes until TCP is dropped.

To workaround this problem (and not mess with deep networking stuff), i've tried to reinitialize client for every check i do. But i found out that even in that case client stiff reuses same dead tcp connection. Is it possible?

I expect reinitializing new client will initiate brand new tcp connection.

Details:
Here i'm initializing client. Function MonitorNode called every 30 seconds.

logs
netstat shows that connection to 172.31.53.156 is broken

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 8, 2018
@thockin thockin added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Apr 2, 2018
@thockin
Copy link
Member

thockin commented Apr 2, 2018

/lifecycle frozen
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 2, 2018
@strugglehonor
Copy link

Hello, how to get node which is in not ready state like kubectl by client-go

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

No branches or pull requests

5 participants