Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
944a7e2b
Unverified
Commit
944a7e2b
authored
May 28, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
May 28, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #77802 from DataDog/lbernail/no-graceful-udp
[proxier/ipvs] Disable graceful termination for UDP traffic
parents
358bfe38
9ff06857
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
graceful_termination.go
pkg/proxy/ipvs/graceful_termination.go
+5
-5
No files found.
pkg/proxy/ipvs/graceful_termination.go
View file @
944a7e2b
...
@@ -17,10 +17,10 @@ limitations under the License.
...
@@ -17,10 +17,10 @@ limitations under the License.
package
ipvs
package
ipvs
import
(
import
(
"fmt"
"sync"
"sync"
"time"
"time"
"fmt"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/klog"
"k8s.io/klog"
utilipvs
"k8s.io/kubernetes/pkg/util/ipvs"
utilipvs
"k8s.io/kubernetes/pkg/util/ipvs"
...
@@ -164,10 +164,10 @@ func (m *GracefulTerminationManager) deleteRsFunc(rsToDelete *listItem) (bool, e
...
@@ -164,10 +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
)
{
//
Delete RS with no connections
//
For UDP traffic, no graceful termination, we immediately delete the RS
//
For UDP, ActiveConn is always 0
//
(existing connections will be deleted on the next packet because sysctlExpireNoDestConn=1)
// For
TCP, InactiveConn are connections not in ESTABLISHED state
// For
other protocols, don't delete until all connections have expired)
if
rs
.
ActiveConn
+
rs
.
InactiveConn
!=
0
{
if
rs
ToDelete
.
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
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment