Merge pull request #1781 from weaveworks/1754-no-with-dns

Remove --with-dns option from proxy
This commit is contained in:
Adam Harrison committed 2015-12-16 14:02:30 +00:00
commit ce18509aa7
4 files changed
+1 -17

No files matched your search

-5
View File
@@ -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 != "" {
-6
View File
@@ -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 {
-5
View File
@@ -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
+1 -1
View File
@@ -47,7 +47,7 @@ weave launch [--password <password>] [--nickname <nickname>]
weave launch-router [--password <password>] [--nickname <nickname>]
[--ipalloc-range <cidr> [--ipalloc-default-subnet <cidr>]]
[--no-discovery] [--init-peer-count <count>] <peer> ...
weave launch-proxy [-H <endpoint>] [--with-dns | --without-dns]
weave launch-proxy [-H <endpoint>] [--without-dns]
[--no-default-ipalloc] [--no-rewrite-hosts]
[--no-multicast-route]
[--hostname-from-label <labelkey>]