Browse code

Revert SDN bridge-nf-call-iptables=0 hack

https://trello.com/c/vnvUCQPG/112-3-remove-the-bridge-nf-call-iptables-hack-sdn-techdebt

Effectively reverts d510a7624da16e5ab821db58e7a1a17e27300e50
"Fix up net.bridge.bridge-nf-call-iptables after kubernetes breaks it"
now that upstream kube PR https://github.com/kubernetes/kubernetes/pull/20647
got merged. The hack is no longer necessary.

Dan Williams authored on 2016/02/26 00:56:27
Showing 2 changed files
... ...
@@ -28,7 +28,6 @@ import (
28 28
 	kexec "k8s.io/kubernetes/pkg/util/exec"
29 29
 	utiliptables "k8s.io/kubernetes/pkg/util/iptables"
30 30
 	utilnet "k8s.io/kubernetes/pkg/util/net"
31
-	"k8s.io/kubernetes/pkg/util/sysctl"
32 31
 	"k8s.io/kubernetes/pkg/volume"
33 32
 
34 33
 	configapi "github.com/openshift/origin/pkg/cmd/server/api"
... ...
@@ -311,18 +310,6 @@ func (c *NodeConfig) RunPlugin() {
311 311
 	}
312 312
 }
313 313
 
314
-// ResetSysctlFromProxy resets the bridge-nf-call-iptables systctl that the Kube proxy sets, which
315
-// is required for normal Docker containers to talk to the SDN plugin on the local system.
316
-// Resolution is https://github.com/kubernetes/kubernetes/pull/20647
317
-func (c *NodeConfig) ResetSysctlFromProxy() {
318
-	if c.SDNPlugin == nil {
319
-		return
320
-	}
321
-	if err := sysctl.SetSysctl("net/bridge/bridge-nf-call-iptables", 0); err != nil {
322
-		glog.Warningf("Could not set net.bridge.bridge-nf-call-iptables sysctl: %s", err)
323
-	}
324
-}
325
-
326 314
 // RunProxy starts the proxy
327 315
 func (c *NodeConfig) RunProxy() {
328 316
 	protocol := utiliptables.ProtocolIpv4
... ...
@@ -316,10 +316,6 @@ func StartNode(nodeConfig configapi.NodeConfig, components *utilflags.ComponentF
316 316
 	if components.Enabled(ComponentProxy) {
317 317
 		config.RunProxy()
318 318
 	}
319
-	// if we are running plugins in this process, reset the bridge ip rule
320
-	if components.Enabled(ComponentPlugins) {
321
-		config.ResetSysctlFromProxy()
322
-	}
323 319
 
324 320
 	return nil
325 321
 }