Skip to content

Commit 0809548

Browse files
roffemurali-reddy
authored andcommitted
closes #413 (#457)
1 parent 6887ce7 commit 0809548

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

pkg/controllers/proxy/network_services_controller.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,18 @@ func (nsc *NetworkServicesController) Run(healthChan chan<- *healthcheck.Control
241241
return errors.New("Failed to do sysctl net.ipv4.vs.conntrack=1 due to: %s" + err.Error())
242242
}
243243

244+
// LVS failover not working with UDP packets https://access.redhat.com/solutions/58653
245+
err = ensureIpvsExpireNodestConn()
246+
if err != nil {
247+
return errors.New("Failed to do sysctl net.ipv4.vs.expire_nodest_conn=1 due to: %s" + err.Error())
248+
}
249+
250+
// LVS failover not working with UDP packets https://access.redhat.com/solutions/58653
251+
err = ensureIpvsQuiescentTemplate()
252+
if err != nil {
253+
return errors.New("Failed to do sysctl net.ipv4.vs.expire_quiescent_template=1 due to: %s" + err.Error())
254+
}
255+
244256
// loop forever unitl notified to stop on stopCh
245257
for {
246258
select {
@@ -1335,6 +1347,14 @@ func ensureIpvsConntrack() error {
13351347
return ioutil.WriteFile("/proc/sys/net/ipv4/vs/conntrack", []byte(strconv.Itoa(1)), 0640)
13361348
}
13371349

1350+
func ensureIpvsExpireNodestConn() error {
1351+
return ioutil.WriteFile("/proc/sys/net/ipv4/vs/expire_nodest_conn", []byte(strconv.Itoa(1)), 0640)
1352+
}
1353+
1354+
func ensureIpvsQuiescentTemplate() error {
1355+
return ioutil.WriteFile("/proc/sys/net/ipv4/vs/expire_quiescent_template", []byte(strconv.Itoa(1)), 0640)
1356+
}
1357+
13381358
func deleteMasqueradeIptablesRule() error {
13391359
iptablesCmdHandler, err := iptables.New()
13401360
if err != nil {

0 commit comments

Comments
 (0)