diff --git a/prog/weaveproxy/main.go b/prog/weaveproxy/main.go index 0cd13eed..d634e22a 100644 --- a/prog/weaveproxy/main.go +++ b/prog/weaveproxy/main.go @@ -39,7 +39,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.BoolVar(&c.NoMulticastRoute, []string{"-no-multicast-route"}, false, "do not add a multicast route via the weave interface when attaching containers") mflag.Parse() @@ -49,10 +48,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 6771d964..3fcd983f 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 ( @@ -56,7 +55,6 @@ type Config struct { NoRewriteHosts bool TLSConfig TLSConfig Version string - WithDNS bool WithoutDNS bool NoMulticastRoute bool DockerHost string @@ -519,10 +517,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 e2267789..3d9f8d22 100755 --- a/weave +++ b/weave @@ -47,7 +47,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] [--no-multicast-route] [--hostname-from-label ]