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
d5c9d27e
Commit
d5c9d27e
authored
Jun 08, 2017
by
Zihong Zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make kubelet touch iptables lock file during initialization
parent
e72c64b7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
kubelet.go
pkg/kubelet/kubelet.go
+10
-0
No files found.
pkg/kubelet/kubelet.go
View file @
d5c9d27e
...
@@ -507,6 +507,16 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub
...
@@ -507,6 +507,16 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub
}
}
glog
.
Infof
(
"Hairpin mode set to %q"
,
hairpinMode
)
glog
.
Infof
(
"Hairpin mode set to %q"
,
hairpinMode
)
// TODO(#36485) Remove this workaround once we fix the init-container issue.
// Touch iptables lock file, which will be shared among all processes accessing
// the iptables.
f
,
err
:=
os
.
OpenFile
(
utilipt
.
LockfilePath16x
,
os
.
O_CREATE
,
0600
)
if
err
!=
nil
{
glog
.
Warningf
(
"Failed to open iptables lock file: %v"
,
err
)
}
else
if
err
=
f
.
Close
();
err
!=
nil
{
glog
.
Warningf
(
"Failed to close iptables lock file: %v"
,
err
)
}
if
plug
,
err
:=
network
.
InitNetworkPlugin
(
kubeDeps
.
NetworkPlugins
,
crOptions
.
NetworkPluginName
,
&
criNetworkHost
{
&
networkHost
{
klet
},
&
network
.
NoopPortMappingGetter
{}},
hairpinMode
,
kubeCfg
.
NonMasqueradeCIDR
,
int
(
crOptions
.
NetworkPluginMTU
));
err
!=
nil
{
if
plug
,
err
:=
network
.
InitNetworkPlugin
(
kubeDeps
.
NetworkPlugins
,
crOptions
.
NetworkPluginName
,
&
criNetworkHost
{
&
networkHost
{
klet
},
&
network
.
NoopPortMappingGetter
{}},
hairpinMode
,
kubeCfg
.
NonMasqueradeCIDR
,
int
(
crOptions
.
NetworkPluginMTU
));
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
else
{
}
else
{
...
...
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