mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Merge pull request #28434 from thockin/br-netfilter-warning
Automatic merge from submit-queue Remove br_netfilter warning in kube-proxy Many distros have this module linked in, generating a spurious error. Fixes #23385
This commit is contained in:
commit
3895cede49
@ -26,7 +26,6 @@ import (
|
|||||||
"encoding/base32"
|
"encoding/base32"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"os"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@ -198,15 +197,8 @@ func NewProxier(ipt utiliptables.Interface, exec utilexec.Interface, syncPeriod
|
|||||||
// Proxy needs br_netfilter and bridge-nf-call-iptables=1 when containers
|
// Proxy needs br_netfilter and bridge-nf-call-iptables=1 when containers
|
||||||
// are connected to a Linux bridge (but not SDN bridges). Until most
|
// are connected to a Linux bridge (but not SDN bridges). Until most
|
||||||
// plugins handle this, log when config is missing
|
// plugins handle this, log when config is missing
|
||||||
warnBrNetfilter := false
|
|
||||||
if _, err := os.Stat("/sys/module/br_netfilter"); os.IsNotExist(err) {
|
|
||||||
warnBrNetfilter = true
|
|
||||||
}
|
|
||||||
if val, err := utilsysctl.GetSysctl(sysctlBridgeCallIptables); err == nil && val != 1 {
|
if val, err := utilsysctl.GetSysctl(sysctlBridgeCallIptables); err == nil && val != 1 {
|
||||||
warnBrNetfilter = true
|
glog.Infof("missing br-netfilter module or unset sysctl br-nf-call-iptables; proxy may not work as intended")
|
||||||
}
|
|
||||||
if warnBrNetfilter {
|
|
||||||
glog.Infof("missing br-netfilter module or unset br-nf-call-iptables; proxy may not work as intended")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate the masquerade mark to use for SNAT rules.
|
// Generate the masquerade mark to use for SNAT rules.
|
||||||
|
Loading…
Reference in New Issue
Block a user