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
64bf2ac5
Unverified
Commit
64bf2ac5
authored
Dec 17, 2018
by
Kubernetes Prow Robot
Committed by
GitHub
Dec 17, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #72106 from DataDog/lbernail/improve-svc-deletion
kube-proxy/IPVS Improve service deletion
parents
4e8bea4b
8bafc977
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
graceful_termination.go
pkg/proxy/ipvs/graceful_termination.go
+1
-0
proxier.go
pkg/proxy/ipvs/proxier.go
+4
-0
No files found.
pkg/proxy/ipvs/graceful_termination.go
View file @
64bf2ac5
...
@@ -168,6 +168,7 @@ func (m *GracefulTerminationManager) deleteRsFunc(rsToDelete *listItem) (bool, e
...
@@ -168,6 +168,7 @@ func (m *GracefulTerminationManager) deleteRsFunc(rsToDelete *listItem) (bool, e
// For UDP, ActiveConn is always 0
// For UDP, ActiveConn is always 0
// For TCP, InactiveConn are connections not in ESTABLISHED state
// For TCP, InactiveConn are connections not in ESTABLISHED state
if
rs
.
ActiveConn
+
rs
.
InactiveConn
!=
0
{
if
rs
.
ActiveConn
+
rs
.
InactiveConn
!=
0
{
klog
.
Infof
(
"Not deleting, RS %v: %v ActiveConn, %v InactiveConn"
,
rsToDelete
.
String
(),
rs
.
ActiveConn
,
rs
.
InactiveConn
)
return
false
,
nil
return
false
,
nil
}
}
klog
.
Infof
(
"Deleting rs: %s"
,
rsToDelete
.
String
())
klog
.
Infof
(
"Deleting rs: %s"
,
rsToDelete
.
String
())
...
...
pkg/proxy/ipvs/proxier.go
View file @
64bf2ac5
...
@@ -1643,6 +1643,10 @@ func (proxier *Proxier) cleanLegacyService(activeServices map[string]bool, curre
...
@@ -1643,6 +1643,10 @@ func (proxier *Proxier) cleanLegacyService(activeServices map[string]bool, curre
// Applying graceful termination to all real servers
// Applying graceful termination to all real servers
for
_
,
rs
:=
range
rsList
{
for
_
,
rs
:=
range
rsList
{
uniqueRS
:=
GetUniqueRSName
(
svc
,
rs
)
uniqueRS
:=
GetUniqueRSName
(
svc
,
rs
)
// If RS is already in the graceful termination list, no need to add it again
if
proxier
.
gracefuldeleteManager
.
InTerminationList
(
uniqueRS
)
{
continue
}
klog
.
V
(
5
)
.
Infof
(
"Using graceful delete to delete: %v"
,
uniqueRS
)
klog
.
V
(
5
)
.
Infof
(
"Using graceful delete to delete: %v"
,
uniqueRS
)
if
err
:=
proxier
.
gracefuldeleteManager
.
GracefulDeleteRS
(
svc
,
rs
);
err
!=
nil
{
if
err
:=
proxier
.
gracefuldeleteManager
.
GracefulDeleteRS
(
svc
,
rs
);
err
!=
nil
{
klog
.
Errorf
(
"Failed to delete destination: %v, error: %v"
,
uniqueRS
,
err
)
klog
.
Errorf
(
"Failed to delete destination: %v, error: %v"
,
uniqueRS
,
err
)
...
...
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