Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1812 from weaveworks/1810-warn-with-dns
Browse files Browse the repository at this point in the history
Issue a warning on --with-dns option to proxy, because it was removed

Fixes #1810
  • Loading branch information
rade committed Dec 22, 2015
2 parents 2ed4b45 + 6b90ef7 commit b1b62af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions prog/weaveproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func main() {
justVersion bool
logLevel = "info"
c = proxy.Config{Image: "weaveworks/weaveexec"}
withDNS bool
)

c.Version = version
Expand All @@ -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()
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions weave
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,9 @@ deprecation_warnings() {
-no-default-ipam|--no-default-ipam)
deprecation_warning $1 "--no-default-ipalloc"
;;
--with-dns)
echo "Warning: $1 has been removed; DNS is on by default" >&2
;;
esac
shift
done
Expand Down

0 comments on commit b1b62af

Please sign in to comment.