mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Merge pull request #53157 from MrHohn/revert-kubelet-touch-lock
Automatic merge from submit-queue (batch tested with PRs 53157, 52628). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Revert "Make kubelet touch iptables lock file during initialization" **What this PR does / why we need it**: Revert #47212. #36485 is fixed so this is no longer needed. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #NONE **Special notes for your reviewer**: /assign @yujuhong @dchen1107 **Release note**: ```release-note NONE ```
This commit is contained in:
commit
d0233d1a50
@ -516,16 +516,6 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
|
||||
}
|
||||
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)
|
||||
}
|
||||
|
||||
plug, err := network.InitNetworkPlugin(kubeDeps.NetworkPlugins, crOptions.NetworkPluginName, &criNetworkHost{&networkHost{klet}, &network.NoopPortMappingGetter{}}, hairpinMode, kubeCfg.NonMasqueradeCIDR, int(crOptions.NetworkPluginMTU))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user