mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
[kube-proxy/ipvs] Generalize handling of InactiveConn to TCP
This commit is contained in:
parent
ed65f6edeb
commit
b11233a2be
@ -164,8 +164,10 @@ func (m *GracefulTerminationManager) deleteRsFunc(rsToDelete *listItem) (bool, e
|
|||||||
}
|
}
|
||||||
for _, rs := range rss {
|
for _, rs := range rss {
|
||||||
if rsToDelete.RealServer.Equal(rs) {
|
if rsToDelete.RealServer.Equal(rs) {
|
||||||
// Don't delete TCP RS with Active Connections or UDP RS (ActiveConn is always 0 for UDP)
|
// Delete RS with no connections
|
||||||
if rs.ActiveConn != 0 || (rsToDelete.VirtualServer.Protocol == "UDP" && rs.InactiveConn != 0) {
|
// For UDP, ActiveConn is always 0
|
||||||
|
// For TCP, InactiveConn are connections not in ESTABLISHED state
|
||||||
|
if rs.ActiveConn+rs.InactiveConn != 0 {
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
klog.Infof("Deleting rs: %s", rsToDelete.String())
|
klog.Infof("Deleting rs: %s", rsToDelete.String())
|
||||||
|
Loading…
Reference in New Issue
Block a user