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

pkg/proxy: panic if run out of fd #6727

Merged
merged 1 commit into from Apr 13, 2015
Merged

pkg/proxy: panic if run out of fd #6727

merged 1 commit into from Apr 13, 2015

Conversation

xiang90
Copy link
Contributor

@xiang90 xiang90 commented Apr 11, 2015

Fix #6716

When proxy runs out of fd, it fills the logs with error message.
From #6716, it is better to just panic().

Manually tested

panic: Accept failed: accept tcp [::]:64676: too many open files

goroutine 10 [running]:
github.com/GoogleCloudPlatform/kubernetes/pkg/proxy.(*tcpProxySocket).ProxyLoop(0xc20802be50, 0x485fb0, 0xd, 0x461db0, 0x4, 0x465af0, 0x1, 0xc208068680, 0xc20809dce0)

..

@@ -79,6 +79,9 @@ func tryConnect(service ServicePortName, srcAddr net.Addr, protocol string, prox
// and keep accepting inbound traffic.
outConn, err := net.DialTimeout(protocol, endpoint, retryTimeout*time.Second)
if err != nil {
if isTooManyFDsError(err) {
panic("Dail failed: " + err.Error())
Copy link
Member

Choose a reason for hiding this comment

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

Typo: Dial

@thockin thockin self-assigned this Apr 11, 2015
When proxy runs out of fd, it fills the logs with error message.
From #6716, it is better to just panic().
@xiang90
Copy link
Contributor Author

xiang90 commented Apr 11, 2015

@thockin Fixed typo. PTAL.

@thockin thockin added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 11, 2015
@thockin
Copy link
Member

thockin commented Apr 11, 2015

LGTM

wojtek-t added a commit that referenced this pull request Apr 13, 2015
pkg/proxy: panic if run out of fd
@wojtek-t wojtek-t merged commit a531a46 into kubernetes:master Apr 13, 2015
@xiang90 xiang90 deleted the panic_fds branch April 13, 2015 14:23
@lavalamp
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kube-proxy to file events when it runs out of FDs
5 participants