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
4e9c2a7a
Unverified
Commit
4e9c2a7a
authored
Nov 16, 2018
by
k8s-ci-robot
Committed by
GitHub
Nov 16, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #71114 from Lion-Wei/ipvs-reuse
fix IPVS low throughput issue
parents
e26b7301
f39060c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
proxier.go
pkg/proxy/ipvs/proxier.go
+8
-0
No files found.
pkg/proxy/ipvs/proxier.go
View file @
4e9c2a7a
...
...
@@ -161,6 +161,7 @@ var ipsetWithIptablesChain = []struct {
const
sysctlRouteLocalnet
=
"net/ipv4/conf/all/route_localnet"
const
sysctlBridgeCallIPTables
=
"net/bridge/bridge-nf-call-iptables"
const
sysctlVSConnTrack
=
"net/ipv4/vs/conntrack"
const
sysctlConnReuse
=
"net/ipv4/vs/conn_reuse_mode"
const
sysctlForward
=
"net/ipv4/ip_forward"
const
sysctlArpIgnore
=
"net/ipv4/conf/all/arp_ignore"
const
sysctlArpAnnounce
=
"net/ipv4/conf/all/arp_announce"
...
...
@@ -313,6 +314,13 @@ func NewProxier(ipt utiliptables.Interface,
}
}
// Set the connection reuse mode
if
val
,
_
:=
sysctl
.
GetSysctl
(
sysctlConnReuse
);
val
!=
0
{
if
err
:=
sysctl
.
SetSysctl
(
sysctlConnReuse
,
0
);
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"can't set sysctl %s: %v"
,
sysctlConnReuse
,
err
)
}
}
// Set the ip_forward sysctl we need for
if
val
,
_
:=
sysctl
.
GetSysctl
(
sysctlForward
);
val
!=
1
{
if
err
:=
sysctl
.
SetSysctl
(
sysctlForward
,
1
);
err
!=
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