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
ae88c2d7
Unverified
Commit
ae88c2d7
authored
Dec 20, 2018
by
Kubernetes Prow Robot
Committed by
GitHub
Dec 20, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #70616 from teemow/teemow-proxy-flush-iptables-first
flush iptable chains first and then remove them
parents
0c7e2079
90d2c5ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
proxier.go
pkg/proxy/ipvs/proxier.go
+5
-1
No files found.
pkg/proxy/ipvs/proxier.go
View file @
ae88c2d7
...
...
@@ -566,7 +566,7 @@ func cleanupIptablesLeftovers(ipt utiliptables.Interface) (encounteredError bool
}
}
// Flush and remove all of our chains.
// Flush and remove all of our chains.
Flushing all chains before removing them also removes all links between chains first.
for
_
,
ch
:=
range
iptablesChains
{
if
err
:=
ipt
.
FlushChain
(
ch
.
table
,
ch
.
chain
);
err
!=
nil
{
if
!
utiliptables
.
IsNotFoundError
(
err
)
{
...
...
@@ -574,6 +574,10 @@ func cleanupIptablesLeftovers(ipt utiliptables.Interface) (encounteredError bool
encounteredError
=
true
}
}
}
// Remove all of our chains.
for
_
,
ch
:=
range
iptablesChains
{
if
err
:=
ipt
.
DeleteChain
(
ch
.
table
,
ch
.
chain
);
err
!=
nil
{
if
!
utiliptables
.
IsNotFoundError
(
err
)
{
klog
.
Errorf
(
"Error removing iptables rules in ipvs proxier: %v"
,
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