From 8a517d5c7c9b6f17dba2f9d5b668ee2b8a74436c Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 22 Dec 2015 10:00:06 +0000 Subject: [PATCH 1/2] Issue a warning on --with-dns option to proxy, because it was removed --- prog/weaveproxy/main.go | 6 ++++++ weave | 3 +++ 2 files changed, 9 insertions(+) diff --git a/prog/weaveproxy/main.go b/prog/weaveproxy/main.go index d634e22a..5b17199e 100644 --- a/prog/weaveproxy/main.go +++ b/prog/weaveproxy/main.go @@ -21,6 +21,7 @@ func main() { justVersion bool logLevel = "info" c = proxy.Config{Image: "weaveworks/weaveexec"} + withDNS bool ) c.Version = version @@ -39,6 +40,7 @@ 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(&withDNS, []string{"#-with-dns", "#w"}, false, "option removed") 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() @@ -57,6 +59,10 @@ func main() { Log.Infoln("weave proxy", version) Log.Infoln("Command line arguments:", strings.Join(os.Args[1:], " ")) + if withDNS { + Log.Warning("--with-dns option has been removed; DNS is on by default") + } + c.DockerHost = defaultDockerHost if dockerHost := os.Getenv("DOCKER_HOST"); dockerHost != "" { c.DockerHost = dockerHost diff --git a/weave b/weave index 21950e60..869f90bc 100755 --- a/weave +++ b/weave @@ -1810,6 +1810,9 @@ deprecation_warnings() { -no-default-ipam|--no-default-ipam) deprecation_warning $1 "--no-default-ipalloc" ;; + --with-dns) + echo "Warning: $1 is deprecated; it is on by default" >&2 + ;; esac shift done From 6b90ef70787f9706e077890cdd3efa79d1d2e207 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 22 Dec 2015 14:56:40 +0000 Subject: [PATCH 2/2] Clarify message --- weave | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weave b/weave index 869f90bc..7eafaa71 100755 --- a/weave +++ b/weave @@ -1811,7 +1811,7 @@ deprecation_warnings() { deprecation_warning $1 "--no-default-ipalloc" ;; --with-dns) - echo "Warning: $1 is deprecated; it is on by default" >&2 + echo "Warning: $1 has been removed; DNS is on by default" >&2 ;; esac shift