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