mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #78999 from andrewsykim/ipvs-graceful-term-fix
ipvs: fix string check for IPVS protocol during graceful termination
This commit is contained in:
commit
101f9ff703
@ -18,6 +18,7 @@ package ipvs
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -167,7 +168,7 @@ func (m *GracefulTerminationManager) deleteRsFunc(rsToDelete *listItem) (bool, e
|
|||||||
// For UDP traffic, no graceful termination, we immediately delete the RS
|
// For UDP traffic, no graceful termination, we immediately delete the RS
|
||||||
// (existing connections will be deleted on the next packet because sysctlExpireNoDestConn=1)
|
// (existing connections will be deleted on the next packet because sysctlExpireNoDestConn=1)
|
||||||
// For other protocols, don't delete until all connections have expired)
|
// For other protocols, don't delete until all connections have expired)
|
||||||
if rsToDelete.VirtualServer.Protocol != "udp" && rs.ActiveConn+rs.InactiveConn != 0 {
|
if strings.ToUpper(rsToDelete.VirtualServer.Protocol) != "UDP" && rs.ActiveConn+rs.InactiveConn != 0 {
|
||||||
klog.Infof("Not deleting, RS %v: %v ActiveConn, %v InactiveConn", rsToDelete.String(), rs.ActiveConn, rs.InactiveConn)
|
klog.Infof("Not deleting, RS %v: %v ActiveConn, %v InactiveConn", rsToDelete.String(), rs.ActiveConn, rs.InactiveConn)
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user