Skip to content
Permalink
Browse files

Merge pull request #78568 from DataDog/automated-cherry-pick-of-#7780…

…2-upstream-release-1.13

Automated cherry pick of #77802 upstream release 1.13
  • Loading branch information...
k8s-ci-robot committed Jun 4, 2019
2 parents 109996e + d7b359c commit 4683545293d792934a7a7e12f2cc47d20b2dd01b
Showing with 5 additions and 5 deletions.
  1. +5 −5 pkg/proxy/ipvs/graceful_termination.go
@@ -17,10 +17,10 @@ limitations under the License.
package ipvs

import (
"fmt"
"sync"
"time"

"fmt"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/klog"
utilipvs "k8s.io/kubernetes/pkg/util/ipvs"
@@ -164,10 +164,10 @@ func (m *GracefulTerminationManager) deleteRsFunc(rsToDelete *listItem) (bool, e
}
for _, rs := range rss {
if rsToDelete.RealServer.Equal(rs) {
// 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 {
// For UDP traffic, no graceful termination, we immediately delete the RS
// (existing connections will be deleted on the next packet because sysctlExpireNoDestConn=1)
// For other protocols, don't delete until all connections have expired)
if 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)
return false, nil
}

0 comments on commit 4683545

Please sign in to comment.
You can’t perform that action at this time.