From 68d6c262d1c39419f6713eead43dd7f3e6fe7505 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Sat, 12 Dec 2015 14:12:39 +0000 Subject: [PATCH] Remove --with-dns option from proxy --- prog/weaveproxy/main.go | 5 ----- proxy/proxy.go | 6 ------ test/630_proxy_dns_test.sh | 5 ----- weave | 2 +- 4 files changed, 1 insertion(+), 17 deletions(-) diff --git a/prog/weaveproxy/main.go b/prog/weaveproxy/main.go index 9db07cd5..4ffa9515 100644 --- a/prog/weaveproxy/main.go +++ b/prog/weaveproxy/main.go @@ -38,7 +38,6 @@ func main() { mflag.BoolVar(&c.TLSConfig.Enabled, []string{"#tls", "-tls"}, false, "Use TLS; implied by --tlsverify") mflag.StringVar(&c.TLSConfig.Key, []string{"#tlskey", "-tlskey"}, "", "Path to TLS key file") mflag.BoolVar(&c.TLSConfig.Verify, []string{"#tlsverify", "-tlsverify"}, false, "Use TLS and verify the remote") - mflag.BoolVar(&c.WithDNS, []string{"-with-dns", "w"}, false, "instruct created containers to always use weaveDNS as their nameserver") mflag.BoolVar(&c.WithoutDNS, []string{"-without-dns"}, false, "instruct created containers to never use weaveDNS as their nameserver") mflag.Parse() @@ -47,10 +46,6 @@ func main() { os.Exit(0) } - if c.WithDNS && c.WithoutDNS { - Log.Fatalf("Cannot use both '--with-dns' and '--without-dns' flags") - } - SetLogLevel(logLevel) if image := os.Getenv("EXEC_IMAGE"); image != "" { diff --git a/proxy/proxy.go b/proxy/proxy.go index bf14cb76..d43b64ca 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -18,7 +18,6 @@ import ( docker "github.com/fsouza/go-dockerclient" . "github.com/weaveworks/weave/common" weavedocker "github.com/weaveworks/weave/common/docker" - "github.com/weaveworks/weave/nameserver" ) const ( @@ -58,7 +57,6 @@ type Config struct { NoRewriteHosts bool TLSConfig TLSConfig Version string - WithDNS bool WithoutDNS bool } @@ -501,10 +499,6 @@ func (proxy *Proxy) getDNSDomain() (domain string) { return "" } - if proxy.WithDNS { - domain = nameserver.DefaultDomain - } - weaveContainer, err := proxy.client.InspectContainer("weave") var weaveIP string if err == nil && weaveContainer.NetworkSettings != nil { diff --git a/test/630_proxy_dns_test.sh b/test/630_proxy_dns_test.sh index 63b9f694..0c6d6e43 100755 --- a/test/630_proxy_dns_test.sh +++ b/test/630_proxy_dns_test.sh @@ -23,11 +23,6 @@ start_suite "Proxy registers containers with dns" bridge_ip=$(weave_on $HOST1 docker-bridge-ip) -# Assert behaviour without weaveDNS running, but dns forced -weave_on $HOST1 launch-proxy --with-dns -do_assert_resolution assert_no_dns_record -weave_on $HOST1 stop-proxy - # Assert behaviour without weaveDNS weave_on $HOST1 launch-proxy do_assert_resolution assert_no_dns_record diff --git a/weave b/weave index bd3c49dc..c306b267 100755 --- a/weave +++ b/weave @@ -46,7 +46,7 @@ weave launch [--password ] [--nickname ] weave launch-router [--password ] [--nickname ] [--ipalloc-range [--ipalloc-default-subnet ]] [--no-discovery] [--init-peer-count ] ... -weave launch-proxy [-H ] [--with-dns | --without-dns] +weave launch-proxy [-H ] [--without-dns] [--no-default-ipalloc] [--no-rewrite-hosts] [--hostname-from-label ] [--hostname-match ]