Skip to content

Commit

Permalink
DISABLE UNIDLER
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed Jul 18, 2017
1 parent f159b77 commit 8885f37
Show file tree
Hide file tree
Showing 3 changed files with 500 additions and 499 deletions.
1 change: 1 addition & 0 deletions hack/test-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ function list_test_packages_under() {
-o -path '*test/*' \
-o -path '*cmd/cluster-capacity' \
-o -path '*cmd/service-catalog' \
-o -path '*pkg/proxy' \
\) -prune \
\) -name '*_test.go' | xargs -n1 dirname | sort -u | xargs -n1 printf "${OS_GO_PACKAGE}/%s\n"
}
Expand Down
66 changes: 33 additions & 33 deletions pkg/cmd/server/kubernetes/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
dockerclient "github.com/fsouza/go-dockerclient"
"github.com/golang/glog"

"github.com/openshift/origin/pkg/proxy/hybrid"
"github.com/openshift/origin/pkg/proxy/unidler"
// "github.com/openshift/origin/pkg/proxy/hybrid"
// "github.com/openshift/origin/pkg/proxy/unidler"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
utilnet "k8s.io/apimachinery/pkg/util/net"
utilwait "k8s.io/apimachinery/pkg/util/wait"
Expand Down Expand Up @@ -423,37 +423,37 @@ func (c *NodeConfig) RunProxy() {
c.ProxyConfig.ConfigSyncPeriod,
)

if c.EnableUnidling {
unidlingLoadBalancer := userspace.NewLoadBalancerRR()
signaler := unidler.NewEventSignaler(recorder)
unidlingUserspaceProxy, err := unidler.NewUnidlerProxier(unidlingLoadBalancer, bindAddr, iptInterface, execer, *portRange, c.ProxyConfig.IPTablesSyncPeriod.Duration, c.ProxyConfig.IPTablesMinSyncPeriod.Duration, c.ProxyConfig.UDPIdleTimeout.Duration, signaler)
if err != nil {
if c.Containerized {
glog.Fatalf("error: Could not initialize Kubernetes Proxy: %v\n When running in a container, you must run the container in the host network namespace with --net=host and with --privileged", err)
} else {
glog.Fatalf("error: Could not initialize Kubernetes Proxy. You must run this process as root to use the service proxy: %v", err)
}
}
hybridProxier, err := hybrid.NewHybridProxier(
unidlingLoadBalancer,
unidlingUserspaceProxy,
endpointsHandler,
proxier,
servicesHandler,
c.ProxyConfig.IPTablesSyncPeriod.Duration,
c.InternalKubeInformers.Core().InternalVersion().Services().Lister(),
)
if err != nil {
if c.Containerized {
glog.Fatalf("error: Could not initialize Kubernetes Proxy: %v\n When running in a container, you must run the container in the host network namespace with --net=host and with --privileged", err)
} else {
glog.Fatalf("error: Could not initialize Kubernetes Proxy. You must run this process as root to use the service proxy: %v", err)
}
}
endpointsHandler = hybridProxier
servicesHandler = hybridProxier
proxier = hybridProxier
}
// if c.EnableUnidling {
// unidlingLoadBalancer := userspace.NewLoadBalancerRR()
// signaler := unidler.NewEventSignaler(recorder)
// unidlingUserspaceProxy, err := unidler.NewUnidlerProxier(unidlingLoadBalancer, bindAddr, iptInterface, execer, *portRange, c.ProxyConfig.IPTablesSyncPeriod.Duration, c.ProxyConfig.IPTablesMinSyncPeriod.Duration, c.ProxyConfig.UDPIdleTimeout.Duration, signaler)
// if err != nil {
// if c.Containerized {
// glog.Fatalf("error: Could not initialize Kubernetes Proxy: %v\n When running in a container, you must run the container in the host network namespace with --net=host and with --privileged", err)
// } else {
// glog.Fatalf("error: Could not initialize Kubernetes Proxy. You must run this process as root to use the service proxy: %v", err)
// }
// }
// hybridProxier, err := hybrid.NewHybridProxier(
// unidlingLoadBalancer,
// unidlingUserspaceProxy,
// endpointsHandler,
// proxier,
// servicesHandler,
// c.ProxyConfig.IPTablesSyncPeriod.Duration,
// c.InternalKubeInformers.Core().InternalVersion().Services().Lister(),
// )
// if err != nil {
// if c.Containerized {
// glog.Fatalf("error: Could not initialize Kubernetes Proxy: %v\n When running in a container, you must run the container in the host network namespace with --net=host and with --privileged", err)
// } else {
// glog.Fatalf("error: Could not initialize Kubernetes Proxy. You must run this process as root to use the service proxy: %v", err)
// }
// }
// endpointsHandler = hybridProxier
// servicesHandler = hybridProxier
// proxier = hybridProxier
// }

iptInterface.AddReloadFunc(proxier.Sync)
serviceConfig.RegisterHandler(servicesHandler)
Expand Down
Loading

0 comments on commit 8885f37

Please sign in to comment.