From 0771ca34fc242b63961caabd6ca4c9e45172c919 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Fri, 5 Oct 2018 21:18:43 -0700 Subject: [PATCH] If you can't set hashsize on nf_conntrack don't fail --- cmd/kube-proxy/app/conntrack.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/kube-proxy/app/conntrack.go b/cmd/kube-proxy/app/conntrack.go index ad9e0e52b7..70c2f96578 100644 --- a/cmd/kube-proxy/app/conntrack.go +++ b/cmd/kube-proxy/app/conntrack.go @@ -81,7 +81,10 @@ func (rct realConntracker) SetMax(max int) error { } // TODO: generify this and sysctl to a new sysfs.WriteInt() klog.Infof("Setting conntrack hashsize to %d", max/4) - return writeIntStringFile("/sys/module/nf_conntrack/parameters/hashsize", max/4) + if err := writeIntStringFile("/sys/module/nf_conntrack/parameters/hashsize", max/4); err != nil { + klog.Errorf("failed to set conntrack hashsize to %d: %v", max/4, err) + } + return nil } func (rct realConntracker) SetTCPEstablishedTimeout(seconds int) error {