mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-10-11 09:51:04 +02:00
This commit is contained in:
parent
6887ce716e
commit
0809548716
@ -241,6 +241,18 @@ func (nsc *NetworkServicesController) Run(healthChan chan<- *healthcheck.Control
|
||||
return errors.New("Failed to do sysctl net.ipv4.vs.conntrack=1 due to: %s" + err.Error())
|
||||
}
|
||||
|
||||
// LVS failover not working with UDP packets https://access.redhat.com/solutions/58653
|
||||
err = ensureIpvsExpireNodestConn()
|
||||
if err != nil {
|
||||
return errors.New("Failed to do sysctl net.ipv4.vs.expire_nodest_conn=1 due to: %s" + err.Error())
|
||||
}
|
||||
|
||||
// LVS failover not working with UDP packets https://access.redhat.com/solutions/58653
|
||||
err = ensureIpvsQuiescentTemplate()
|
||||
if err != nil {
|
||||
return errors.New("Failed to do sysctl net.ipv4.vs.expire_quiescent_template=1 due to: %s" + err.Error())
|
||||
}
|
||||
|
||||
// loop forever unitl notified to stop on stopCh
|
||||
for {
|
||||
select {
|
||||
@ -1335,6 +1347,14 @@ func ensureIpvsConntrack() error {
|
||||
return ioutil.WriteFile("/proc/sys/net/ipv4/vs/conntrack", []byte(strconv.Itoa(1)), 0640)
|
||||
}
|
||||
|
||||
func ensureIpvsExpireNodestConn() error {
|
||||
return ioutil.WriteFile("/proc/sys/net/ipv4/vs/expire_nodest_conn", []byte(strconv.Itoa(1)), 0640)
|
||||
}
|
||||
|
||||
func ensureIpvsQuiescentTemplate() error {
|
||||
return ioutil.WriteFile("/proc/sys/net/ipv4/vs/expire_quiescent_template", []byte(strconv.Itoa(1)), 0640)
|
||||
}
|
||||
|
||||
func deleteMasqueradeIptablesRule() error {
|
||||
iptablesCmdHandler, err := iptables.New()
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user